Android(安卓)market:// 链接到Google Play 商店
16lz
2022-05-28
如果只是想启动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
更多相关文章
- Android(安卓)NumberPicker详细使用
- Android(安卓)APK 反编译工具
- Android(安卓)获取当前语言的方法1
- Android的setTag
- Android中使用AndroidTestCase的方法实例
- android notification和notificationmanager使用
- 箭头函数的基础使用
- NPM 和webpack 的基础使用
- Python list sort方法的具体使用