2015-08-15 318 views
7

最近,Google Play让开发者创建开发者页面。如何在Google Play商店中打开开发者页面(market://)

这里是例子: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); 
+0

我为您的问题添加了正确的解决方案。 (market:// dev?id = 5700313618786177705)不会打开Playstore应用程序。 –

回答

5

你可以简单地调用市场://机号= XXX 例如为:

market://dev?id=5700313618786177705 

我希望,这个适合您的需要!

最佳, 杰克逊

+1

这根本行不通 – derfect

+0

谢谢,它的工作原理! @Rayes,将它作为setData(Uri)使用时的工作原理 – ymonaraS

+0

@Rayes:它的工作原理如下: 'startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(“market:// dev?id = 5700313618786177705” )))' – Jacko0815

3

这个工作对我来说:

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

使用市场URI对我不起作用。

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