Deep linking is a way to open a specific page or screen inside a mobile app directly from a link, instead of just opening the app's home screen.
Click to reveal answer
intermediate
What is the difference between a universal link and a custom URL scheme?
A universal link uses standard web URLs that open the app if installed or the website if not. A custom URL scheme uses a special app-defined prefix like "myapp://" to open the app.
Click to reveal answer
beginner
Which React Native library is commonly used to handle deep linking?
React Navigation is commonly used in React Native apps to handle deep linking and navigation between screens.
Click to reveal answer
intermediate
Why is it important to configure deep linking in both Android and iOS?
Because Android and iOS handle links differently, you must set up deep linking separately for each platform to ensure links open the app correctly on both.
Click to reveal answer
beginner
What happens if a deep link is opened but the app is not installed?
If the app is not installed, universal links open the website URL instead, while custom URL schemes usually do nothing or show an error.
Click to reveal answer
What does a deep link do in a mobile app?
AUpdates the app automatically
BCloses the app
CUninstalls the app
DOpens a specific screen inside the app
✗ Incorrect
Deep links open a specific screen or content inside the app directly.
Which of these is an example of a custom URL scheme?
Amyapp://profile/123
Bftp://fileserver.com
Chttps://example.com/home
Dmailto:user@example.com
✗ Incorrect
Custom URL schemes use a unique prefix like "myapp://" to open the app.
Which React Native tool helps manage deep linking navigation?
AExpo Camera
BRedux
CReact Navigation
DAxios
✗ Incorrect
React Navigation handles screen navigation and deep linking in React Native apps.
What should you do to support deep linking on iOS?
AInstall Android Studio
BConfigure URL types in Xcode
CUse Google Play Store
DDisable internet access
✗ Incorrect
On iOS, you configure URL types in Xcode to support deep linking.
If a user clicks a universal link but the app is not installed, what happens?
AThe website opens in the browser
BThe app opens anyway
CNothing happens
DThe phone restarts
✗ Incorrect
Universal links open the website if the app is not installed.
Explain what deep linking is and why it is useful in mobile apps.
Think about how clicking a link can take you straight to a specific page inside an app.
You got /3 concepts.
Describe the difference between universal links and custom URL schemes in deep linking.
Consider how links behave differently depending on the link type and app installation.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of deep linking in a React Native app?
easy
A. To create animations between screens
B. To open specific screens in the app from external links
C. To improve app performance by caching data
D. To handle user authentication automatically
Solution
Step 1: Understand deep linking concept
Deep linking allows apps to open specific screens directly from a URL or link.
Step 2: Identify the main purpose
This helps users navigate directly to content without opening the app's home screen first.
Final Answer:
To open specific screens in the app from external links -> Option B
Quick Check:
Deep linking = open specific screens [OK]
Hint: Deep linking opens app screens from links [OK]
Common Mistakes:
Confusing deep linking with app performance
Thinking it handles animations
Assuming it manages authentication
2. Which React Native API is used to listen for incoming deep links?
easy
A. AsyncStorage
B. Navigation
C. Linking
D. Animated
Solution
Step 1: Recall React Native APIs
React Native provides the Linking API to handle URLs and deep links.
Step 2: Match API to deep linking
Linking listens for URL events and opens the app screen accordingly.
Final Answer:
Linking -> Option C
Quick Check:
Linking API = deep link listener [OK]
Hint: Use Linking API to handle URLs [OK]
Common Mistakes:
Choosing Navigation which manages screen transitions
Confusing with AsyncStorage for data storage
Picking Animated which is for animations
3. What will happen when this code runs and the app receives the URL myapp://profile/123?
D. It does nothing because the listener is incorrect
Solution
Step 1: Understand the event listener
The code listens for 'url' events and logs the event.url string.
Step 2: Analyze the URL received
When the app receives 'myapp://profile/123', the listener logs this exact string.
Final Answer:
It logs 'myapp://profile/123' to the console -> Option A
Quick Check:
Listener logs URL = correct output [OK]
Hint: Listener logs incoming URL string [OK]
Common Mistakes:
Assuming it opens screen automatically without navigation code
Thinking the code has syntax errors
Believing the listener does nothing
4. Identify the error in this deep linking setup code:
Linking.addEventListener('url', handleUrl);
function handleUrl(event) {
console.log(event);
}
// Later
Linking.removeEventListener('url', handleUrl);
medium
A. removeEventListener should be called with a different event name
B. addEventListener requires a second argument as a string
C. handleUrl function should return a value
D. removeEventListener is deprecated; use remove() on the subscription
Solution
Step 1: Check React Native Linking API usage
In recent React Native versions, addEventListener returns a subscription object with a remove() method.
Step 2: Identify correct removal method
removeEventListener is deprecated; you should call subscription.remove() instead.
Final Answer:
removeEventListener is deprecated; use remove() on the subscription -> Option D
Quick Check:
Use subscription.remove() not removeEventListener [OK]
Hint: Use subscription.remove() to stop listening [OK]
Common Mistakes:
Calling removeEventListener which is deprecated
Expecting handleUrl to return a value
Passing wrong argument types to addEventListener
5. You want your React Native app to open the screen showing details for a product when a user clicks a link like myshop://product/42. Which steps are necessary to implement this deep linking behavior correctly?
hard
A. Configure URL scheme in app settings, listen for URL events, parse product ID, navigate to product screen
B. Only listen for URL events and log them; navigation happens automatically
C. Use AsyncStorage to save the URL, then read it on app start
D. Set up a web server to redirect links to the app
Solution
Step 1: Configure app to handle custom URL scheme
You must set up your app to recognize 'myshop://' links in platform config files.
Step 2: Listen for URL events and parse the product ID
Use Linking API to detect incoming URLs and extract the product ID from the URL path.
Step 3: Navigate to the product screen with the parsed ID
Use your navigation library to open the product detail screen with the correct ID.
Final Answer:
Configure URL scheme in app settings, listen for URL events, parse product ID, navigate to product screen -> Option A
Quick Check:
Full deep linking setup = Configure URL scheme in app settings, listen for URL events, parse product ID, navigate to product screen [OK]