I have link of my other apps in my latest app, and I open them in that way.
Uri uri = Uri.parse("url");
Intent intent = new Intent (Intent.ACTION_VIEW, uri);
startActivity(intent);
this codes opens the browser version of google play store.
When trying to open from my phone, the phone prompts if I want to use a browser or google play and if I choose the second one it opens the mobile version of google play store.
Can you tell me how can this happen at once? I mean not ask me but directly open the mobile version of google play, the one that I see while open it directly from phone.
Best Answer
You'll want to use the specified
market
protocol:Keep in mind, this will crash on any device that does not have the Market installed (the emulator, for example). Hence, I would suggest something like:
While using
getPackageName()
fromContext
or subclass thereof for consistency (thanks @cprcrack!). You can find more on Market Intents here: link.