2

我需要从用于登录强制门户的 android 浏览器打开 Google Play 应用程序中的应用程序页面,但没有一种传统方法可以在此浏览器中使用 market:// 链接和意图

4

1 回答 1

-1
final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object
try {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
}

希望它会帮助你。

于 2015-10-29T13:39:56.430 回答