Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AppLaunchChecker
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
magiepooh
April 21, 2016
Technology
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AppLaunchChecker
AppLaunchChecker
magiepooh
April 21, 2016
More Decks by magiepooh
See All by magiepooh
今さら角丸のTransition
magiepooh
0
1.6k
Google I/O Extended Tokyo 2018
magiepooh
2
1.7k
APIのデータのマッピングを 約18倍速くした話
magiepooh
2
1.1k
まだAPI定義管理で消耗してるの?〜Swaggerを用いた大規模アプリ時代のAPI定義管理とコードジェネレート〜
magiepooh
38
19k
RootBeer
magiepooh
0
910
Customize Error Message
magiepooh
0
930
Kotlin入門
magiepooh
2
2k
Adjust Full Screen
magiepooh
2
580
How to get size of NavigationBar and StatusBar
magiepooh
1
1.9k
Other Decks in Technology
See All in Technology
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
150
freeeにおけるSoftware Factory
freee
PRO
0
480
撮るだけでは終わらない。ソニーが挑むB2Bカメラソリューション開発
sony
0
110
野良MCPサーバーを排除せよ!MCPサーバーのガバナンス
yukiogawa
1
230
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
1.2k
Practical ransomware detection on macOS (via maths, not AI)
patrickwardle
0
110
「Learning Outcome」を書きたくない私が、Learning Outcomeと折り合いをつけるまで
mhlyc
0
230
ガチで放置できるClaude Code実行環境の作り方.pdf
lamaglama39
5
9.6k
生成AI時代、PMは事業責任者に進化するともっと面白い〜PMだからこそ事業構造を動かせる時代に〜
kakehashi
PRO
0
840
AWS DevOps Agentはどこまで任せられるか 〜機能の現在地と、機能拡張の実践〜
nyankotaro
0
230
React改造してみた
tsukina_7mochi
0
160
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1.1k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
940
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
900
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Done Done
chrislema
187
17k
First, design no harm
axbom
PRO
2
1.4k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Prompt Engineering for Job Search
mfonobong
0
540
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Transcript
AppLaunchChecker @magiepooh
About me @magiepooh @magie_pooh Takuma Fujita
Company AbemaTV, Inc. (Cyber Agent, Inc.)
AppLaunchChecker
?
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AppLaunchChecker.hasStartedFromLauncher(this); // =>
false }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AppLaunchChecker.onActivityCreate(this); AppLaunchChecker.hasStartedFromLauncher(this); //
=> true }
public static boolean hasStartedFromLauncher(Context context) { return context.getSharedPreferences(SHARED_PREFS_NAME, 0) .getBoolean(KEY_STARTED_FROM_LAUNCHER,
false); } public static void onActivityCreate(Activity activity) { final SharedPreferences sp = activity.getSharedPreferences(SHARED_PREFS_NAME, 0); if (sp.getBoolean(KEY_STARTED_FROM_LAUNCHER, false)) { return; } final Intent launchIntent = activity.getIntent(); if (launchIntent == null) { return; } if (Intent.ACTION_MAIN.equals(launchIntent.getAction()) && (launchIntent.hasCategory(Intent.CATEGORY_LAUNCHER) || launchIntent.hasCategory(IntentCompat.CATEGORY_LEANBACK_LAUNCHER))) { SharedPreferencesCompat.EditorCompat.getInstance().apply( sp.edit().putBoolean(KEY_STARTED_FROM_LAUNCHER, true)); } } AppLaunchChecker.java
public static boolean hasStartedFromLauncher(Context context) { return context.getSharedPreferences(SHARED_PREFS_NAME, 0) .getBoolean(KEY_STARTED_FROM_LAUNCHER,
false); } public static void onActivityCreate(Activity activity) { final SharedPreferences sp = activity.getSharedPreferences(SHARED_PREFS_NAME, 0); if (sp.getBoolean(KEY_STARTED_FROM_LAUNCHER, false)) { return; } final Intent launchIntent = activity.getIntent(); if (launchIntent == null) { return; } if (Intent.ACTION_MAIN.equals(launchIntent.getAction()) && (launchIntent.hasCategory(Intent.CATEGORY_LAUNCHER) || launchIntent.hasCategory(IntentCompat.CATEGORY_LEANBACK_LAUNCHER))) { SharedPreferencesCompat.EditorCompat.getInstance().apply( sp.edit().putBoolean(KEY_STARTED_FROM_LAUNCHER, true)); } } AppLaunchChecker.java
• SharedPreferencesʹΠϯςϯτͷΞΫγϣϯ ͱ͔ΧςΰϦͱ͔ݟͯϥϯνϟʔ͔Βىಈ͠ ͔ͨΛॻ͖ࠐΜͰΔ͚ͩ • SharedPreferencesͷΛϦηοτ͢Δͷ ༻ҙ͞Ε͍ͯͳ͍
• Πϯετʔϧ > Launcherىಈ // true • Πϯετʔϧ > DeepLink
// false • Πϯετʔϧ > Launcherىಈ > DeepLink // true ݁ɿ
݁ɿ • Πϯετʔϧ > Launcherىಈ // true • Πϯετʔϧ >
DeepLink // false • Πϯετʔϧ > Launcherىಈ > DeepLink // true աڈʹϢʔβ͕ҰͰLauncher͔Βىಈ͔ͨ͠Ͳ͏͔
݁ɿ Ͳ͜Ͱ͑Δ͔શ͘ Θ͔ΒΜɻ