如果只是想启动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