如何打开Google Play Store的开发者页面(市场://)



最近,Google Play允许开发者创建开发者页面。

示例如下:https://play.google.com/store/apps/dev?id=5700313618786177705

我试图找到开发者页面Uri链接(市场://…),我可以使用,但我无法在Android开发者页面上找到它。(http://developer.android.com/distribute/tools/promote/linking.html)

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://..."));
startActivity(intent);

这个适合我:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=7809285959465313029")));

使用市场URI不适合我。

您可以简单地调用market://dev?id = xxx例如:

market://dev?id=5700313618786177705

我希望,这符合你的需要!

最好的,Jacko

//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;
        }
    }

Kotlin使用开发人员名称代替开发人员Id:

startActivity(Intent(Intent.ACTION_VIEW,
     Uri.parse("https://play.google.com/store/apps/developer?id=MyDeveloperName")))

打开应用程序在google play:你可以使用:

getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=<developer_id>)));

getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://dev?id=<developer_id>)));

最新更新