A deep link is a URL that opens a specific page or content inside an app instead of just launching the app's home screen.
Click to reveal answer
intermediate
How do you declare a deep link in AndroidManifest.xml?
You add an <intent-filter> inside an <activity> with <action android:name="android.intent.action.VIEW" />, <category android:name="android.intent.category.DEFAULT" />, <category android:name="android.intent.category.BROWSABLE" />, and <data> specifying the URI scheme and host.
Click to reveal answer
intermediate
What is the difference between an explicit and implicit deep link?
Explicit deep links open a specific screen in your app using a URI you define. Implicit deep links use standard web URLs that can open your app or a website if the app is not installed.
Click to reveal answer
beginner
Why is the android.intent.category.BROWSABLE category important for deep links?
It allows your app to be opened from a web browser when a user clicks a link, enabling the deep link to work from outside the app.
Click to reveal answer
beginner
How can you test a deep link on an Android device?
You can use the command adb shell am start -W -a android.intent.action.VIEW -d "yourapp://path" your.package.name or click a link with the matching URI on the device.
Click to reveal answer
Which intent action is used to declare a deep link in Android?
Aandroid.intent.action.VIEW
Bandroid.intent.action.MAIN
Candroid.intent.action.SEND
Dandroid.intent.action.CALL
✗ Incorrect
The action VIEW is used to open content specified by a URI, which is essential for deep linking.
What does the android.intent.category.BROWSABLE category allow?
ALaunching the app from the home screen
BOpening the app from a web browser link
CSending data between apps
DRunning background services
✗ Incorrect
BROWSABLE lets the app respond to links clicked in a web browser.
Which file do you modify to add deep link support in an Android app?
AMainActivity.kt
Bbuild.gradle
Cstrings.xml
DAndroidManifest.xml
✗ Incorrect
Deep links are declared in the AndroidManifest.xml inside intent filters.
What is an implicit deep link?
AA link that requires user login
BA link that only opens the app's home screen
CA link that opens a web URL or app if installed
DA link that opens a system settings page
✗ Incorrect
Implicit deep links use standard web URLs and can open the app or fallback to a website.
How can you test a deep link using adb?
Aadb shell am start -W -a android.intent.action.VIEW -d "yourapp://path" your.package.name
Badb install yourapp.apk
Cadb logcat
Dadb shell pm clear your.package.name
✗ Incorrect
This adb command launches the deep link URI to test if it opens the app correctly.
Explain how to add a deep link to an Android app and why each part of the intent filter is important.
Think about how the app knows to open from a link and from where the link can come.
You got /5 concepts.
Describe the difference between explicit and implicit deep links and give an example of when to use each.
Consider if the link is custom or a normal web address.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of a deep link in an Android app?
easy
A. To open a specific screen inside the app from an external URL
B. To update the app's user interface colors
C. To increase the app's memory usage
D. To change the app's icon on the home screen
Solution
Step 1: Understand deep link functionality
Deep links allow an app to open a specific screen or content when a user clicks a URL outside the app.
Step 2: Compare options with this purpose
Only To open a specific screen inside the app from an external URL describes opening a specific screen from an external URL, which matches deep link behavior.
Final Answer:
To open a specific screen inside the app from an external URL -> Option A
Quick Check:
Deep link purpose = open specific screen [OK]
Hint: Deep links open app screens from outside links [OK]
Common Mistakes:
Confusing deep links with UI styling
Thinking deep links change app icons
Assuming deep links increase memory
2. Which XML element is used to declare a deep link in AndroidManifest.xml?
easy
A. <provider>
B.
C. <service>
D. <activity>
Solution
Step 1: Identify where deep links are declared
Deep links are declared inside an element within an activity in AndroidManifest.xml.
Step 2: Match options to this element
Only is used to specify deep link URL patterns and actions.
Final Answer:
<intent-filter> -> Option B
Quick Check:
Deep links declared in intent-filter [OK]
Hint: Deep links go inside intent-filter tags [OK]
Common Mistakes:
Confusing activity tag with deep link declaration
Using service or provider tags incorrectly
Not nesting intent-filter inside activity
3. Given this intent filter snippet in AndroidManifest.xml, what URL will open the app's activity?
The scheme is https, host is example.com, and pathPrefix is /profile, so URLs starting with https://example.com/profile will match.
Step 2: Check each option against these rules
https://example.com/profile/settings matches https scheme, example.com host, and path starting with /profile. Options B (http scheme), C (wrong path), and D (wrong host) do not match.
Final Answer:
https://example.com/profile/settings -> Option C
Quick Check:
Match scheme, host, pathPrefix = https://example.com/profile/settings [OK]
Hint: Match scheme, host, and pathPrefix exactly [OK]
Common Mistakes:
Ignoring scheme (http vs https)
Confusing host names
Not checking pathPrefix carefully
4. What is wrong with this intent filter for a deep link?
Deep links require the BROWSABLE category to allow opening from browsers or external apps.
Step 2: Identify incorrect category usage
This intent filter uses LAUNCHER category, which is for app launchers, not deep links.
Final Answer:
It uses LAUNCHER category instead of BROWSABLE -> Option A
Quick Check:
Deep links need BROWSABLE category [OK]
Hint: Deep links need BROWSABLE, not LAUNCHER category [OK]
Common Mistakes:
Using LAUNCHER category for deep links
Forgetting to add BROWSABLE category
Placing intent-filter inside wrong tag
5. You want your app to open a user profile screen when a link like myapp://user/123 is clicked. Which intent filter correctly handles this deep link?
hard
A. \n \n \n \n
B. \n \n \n \n \n
C. \n \n \n \n
D. \n \n \n \n \n
Solution
Step 1: Check required action and categories for deep links
Deep links need action VIEW and categories DEFAULT and BROWSABLE to work properly.
Step 2: Verify data attributes match the URL pattern
The URL myapp://user/123 has scheme="myapp", host="user", path="/123". Needs matching scheme, host, and pathPattern="/.*" for variable IDs.
Step 3: Compare options
The filter with scheme="myapp", host="user", pathPattern="/.*", VIEW action, DEFAULT and BROWSABLE matches perfectly. pathPrefix="/user" without host mismatches path="/123". Missing BROWSABLE limits external opening. MAIN/LAUNCHER is incorrect for deep links.
Final Answer:
Intent filter with VIEW action, DEFAULT/BROWSABLE categories, scheme myapp, host user, pathPattern /.* -> Option D