Test deep links on Android
After this page, you've seen each kind of link open your Android app on a real phone, and you know where to look when one doesn't.
On this page 7
- Time
- About 15 minutes, plus a Google Play internal testing build for deferred links
- You need
- Links routed to screens (Receive links), a phone with USB debugging
- Works on
- Android
1. Test the routing without a tap
# Browser hand-off (custom scheme)
adb shell am start -W -a android.intent.action.VIEW -d "yourapp://shop.example.com/product/42?color=red"
# Verified link
adb shell am start -W -a android.intent.action.VIEW -d "https://hilltop.strait.link/summer"You should see: ProductActivity for 42, once with the app closed and once from the background.
2. Check App Links verification
adb shell pm get-app-links com.yourcompany.yourappYou should see: hilltop.strait.link: verified. If it says 1024 or none, the installed build's certificate isn't in Apps & stores (go-live checklist, step 1). Reinstall after fixing it: Android checks at install time.
3. Tap a real link from a chat app
Send https://hilltop.strait.link/summer to yourself in Google Messages, Gmail and WhatsApp, and tap it in each.
You should see: the app opens on the link's screen with no browser in between (verified), or after a brief browser flash (hand-off). WhatsApp and Instagram may show an Open in app page first.
4. Ask what a tap would do
curl "https://strait.link/v1/simulate?url=https%3A%2F%2Fhilltop.strait.link%2Fsummer&ua=android" \
-H "Authorization: Bearer $SECRET_KEY"You should see: a decision of redirect, a location starting intent://, and a plain-English reason. No tap is recorded. See Dry-run a tap.
5. Test a deferred link from Google Play
Install from Google Play internal testing (go-live checklist, step 3). Uninstall, tap the link, install from Play and open the app. To check without reinstalling, links.checkDeferred() re-runs the check off the main thread and never records an install.
You should see: the first screen is the link's screen, with kind deferred and route install_referrer.
Common errors
- The deferred test opens the home screen. The build came from Android Studio, not Play, or "When someone without the app taps a link" isn't Always Google Play while the app is unlisted.
- Samsung Internet keeps the link in the browser. Turn on Settings → Useful features → Open links in other apps.
- Firefox or Edge asks before opening the app. That's the browser's choice and can't be skipped. More in Troubleshooting.
Next steps
- Go-live checklist: everything to finish before real users tap your links.
- Reference: every option, method and event field.