Reputation: 683
Google recently implemented a feature into Google Search that allows a user to install your app on the fly if the result can be opened in your app.
Is there any way to detect if this is how your app was opened? Installed and deep linked from a Google Search?
Upvotes: 5
Views: 1014
Reputation: 4248
You can query the Intent extra android.intent.extra.REFERRER_NAME
in your Activity to check if your app was deep-linked from Google Search.
The value of the extra will have one of the following formats, depending on the type of referrer:
App referrer — "android-app://{package_id}/{scheme}/{host_path}"
Web referrer — "https://{host_path}"
Upvotes: 5