//Method for intent to Google playstore developer page
private void M_Intent2developerpage() {
Intent intentdev = new Intent(Intent.ACTION_VIEW);
intentdev.setData(Uri.parse("market://search?q=pub:Google Inc."));
//here Developer Name is very case-sensitive . change your developer name as shown in developers page.
if (!MyStartActivity(intentdev)) {
intentdev.setData(Uri.parse("https://play.google.com/store/apps/dev?id=5700313618786177705"));
if (!MyStartActivity(intentdev)) {
Toast.makeText(this, "Could not open Android Google PlayStore, please install the Google play app.", Toast.LENGTH_SHORT).show();
}
}
}
//Method checks if any problem when Intent
public boolean MyStartActivity(Intent aIntent) {
try {
startActivity(aIntent);
return true;
} catch (ActivityNotFoundException e) {
return false;
}
}
我爲您的問題添加了正確的解決方案。 (market:// dev?id = 5700313618786177705)不會打開Playstore應用程序。 –