hello I am working on my own launcher that has a button that says "Google Play" what I want it to do is when the user clicks this button it takes them to the google play store home page NOT to a specific app page
heres my code:
/** Called when the user clicks the play button */
public void play(View view) {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.android.vending","what goes here??"));
intent.putExtra("grace", "Hi");
startActivity(intent);
}
Thanks way in advance
Regards
Chris
Some other people have got the same problem: How to click on Android Button then go to google play apps
public void play(View view) {
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=com.theopen.android"));
startActivity(intent);
}
Code idea from the answer from user "MAC".
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.android.vending");
startActivity(launchIntent);
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