On an Android device, opening a link to an app on Google Play:
https://play.google.com/store/apps/details?id=com.rovio.angrybirds&hl=en
will automatically open the Google Play app by default.
But if you have a link that redirects to the Google Play link, the device opens the browser and then navigates to the browser version of Google Play. Why does this behavior occur?
Unfortunately I cannot use the market:// with Intents which can open Play, I have only control over a web link.
edit: Seems like if I have the link redirect to the market:// url, it can open with Google Play on device.
If link is opened in browser, somehow it is able to redirect to browser version of Google Play despite market:// not being supported in browser.
First of all you need to add intent filters for incoming links. Specify the ACTION_VIEW intent action so that the intent filter can be reached from Google Search. Add one or more tags, each of which represents a URI format that resolves to the activity. At minimum, the tag must include the android:scheme attribute.
Once you build a link with same signature as mentioned in manifest The android system will add your app in chooser to open link in your app and you will get the data in "getIntent(). getData()" in respective Activity. If app is not installed the link will itself open in browser. Then handle it on browser .
Overview of Android App LinksApp Links use HTTP URLs associated with your website domain, and allow a specific app to be the default owner of a given type of link. This ensures that no other app can use your links for deep linking.
Use target="_top"
<a href="market://details?id={package_name}" target="_top">App</a>
Basically, the https://play.... is just a web URL. I suspect the way this works (which is the way standard way Android works) is:
You can either call the Play Market directly with the market intent, or use the URL way. I personally use the URL way - even though there are some additional challenges to use it (like handling this particular issue).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With