I wonder how to make a android button can click and redirect user to google play.
Example: I want send user to android apps(https://play.google.com/store/apps/details?id=com.theopen.android) after user click on Button in my activity.
How to do this?
Regards,
intent = new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=com.theopen.android"));
startActivity(intent);
This will open your application in Play store(android market)
To redirect to google play, we need to check whether the mobile already have play store app, if not google play should be opened in browser.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.app"));
try{
startActivity(intent);
}
catch(Exception e){ intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.android.app"));
}
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