Opening app in Google Play from a redirect link
Use target="_top"
<a href="market://details?id={package_name}" target="_top">App</a>
My guess would be that the behaviour is enforced by Google. Redirects would potentially make it easier for developers with bad intentions to install their apps. Google probably checks if the user comes from a redirect, and if yes it doesn't trigger opening of the Play app.
Basically, the https://play.... is just a web URL. I suspect the way this works (which is the way standard way Android works) is:
- The Market Play App registers to be able to handle URLs of this kind (you can register to handle certain intents, and apply filters to further define what your app will handle).
- The app launches the Intent with the https://play... URL
- The User is presented with a list of all apps that are registered to handle that intent. SO, the User is able to launch the Play App - the first time (on the phone) the https:\play... intent is launched
- When the user chooses which app to fulfill the Intent, if they select Browser (then set it as a default) - the Browser will launch (and will not offer the user the option the next time).
- This default can be by: "Settings\Applications\All - Then find the Browser App, select it, and then select Clear Defaults"
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).