Android market:// 链接到Google Play 商店 您所在的位置:网站首页 intent商店 Android market:// 链接到Google Play 商店

Android market:// 链接到Google Play 商店

2024-03-07 17:49| 来源: 网络整理| 查看: 265

如果只是想启动Google play store,可以使用:

Intent intent = new Intent(); intent.addCategory(Intent.CATEGORY_LAUNCHER); intent.setAction(Intent.ACTION_MAIN); intent.setComponent(new ComponentName("com.android.vending", "com.google.android.finsky.activities.LaunchUrlHandlerActivity")); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);

通过packname,搜索某个应用,使用market://details?id=android包名(一对一的搜索)

例如,搜索Adobe Reader

Intent intent= new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=com.adobe.reader")); startActivity(intent)

通过关键字搜索,使用“market://search?q=keyword”(一对多的搜索)

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

点击google play store后,结果如下图。

;

如果想要了解更多的market链接方法(比如通过开发者名称搜索App),请参考http://moto0421.iteye.com/blog/1030350



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有