2013-11-24 31 views
0

我想在我的Android应用程序中创建一个弹出窗口,以向用户投放市场投票我的应用程序。情况是,为了做到这一点,我实际上需要'id'游戏商店将给我的应用程序...但如果我没有上传它,我现在怎么知道我正在开发它?我的Android应用程序评分

有什么想法?谢谢!

回答

1

利用软件包名称,Google Play将根据您的应用的软件包名称生成Play商店链接。

Intent intent = new Intent(Intent.ACTION_VIEW); 
    //Try Google play 
    intent.setData(Uri.parse("market://details?id=[package]")); 
    if (MyStartActivity(intent) == false) { 
     //Market (Google play) app seems not installed, let's try to open a webbrowser 
     intent.setData(Uri.parse("https://play.google.com/store/apps/details?[package]")); 
     if (MyStartActivity(intent) == false) { 
      //Well if this also fails, we have run out of options, inform the user. 
      Toast.makeText(this, "Could not open Android market, please install the market app.", Toast.LENGTH_SHORT).show(); 
     } 
    } 

来源:Android: How to create a “Rate this app” button

+0

感谢您的联系! – Frion3L

相关问题