2015-08-15 134 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; 
     } 
    } 
相關問題