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.
If you want to open Google Play store from your app then use this command directy: market://details?gotohome=com.yourAppName , it will open your app's Google Play store pages.
Any http://play.google.com?id=* link will prompt the user in this way on an Android device.
This opens the Google Play Store. TIP: If you can't find the Play Store, you can also type "play store" in the search field displayed at the top of the All Apps screen. 2. Open the Google Play Store from its Home screen shortcut Some Android smartphones come with a shortcut to the Play Store app on the Home screen for easy access.
On your Android device, Google's Play Store is the portal to your favorite content, so knowing how to open it can come in handy. You use it to download apps, games, and all kinds of digital content. It also handles updates for your apps. This tutorial teaches you all the ways to open the Google Play Store app on your Android smartphone or tablet:
Open the Google Play Store from the All Apps screen The All Apps screen is the fail-safe way to open any app on your Android device. On the Home screen, either tap the All apps button, which is available on most Android smartphones, or swipe up to access the All Apps screen.
On the Home screen, either tap the All apps button, which is available on most Android smartphones, or swipe up to access the All Apps screen. On the All Apps screen, find the Play Store app and tap on it.
You'll want to use the specified market
protocol:
final String appPackageName = "com.example"; // Can also use getPackageName(), as below startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
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:
final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object try { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName))); } catch (android.content.ActivityNotFoundException anfe) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName))); }
While using getPackageName()
from Context
or subclass thereof for consistency (thanks @cprcrack!). You can find more on Market Intents here: link.
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