首页 > 系统 > Android > 正文

android 跳转进市场的实现代码

2019-10-24 20:47:15
字体:
来源:转载
供稿:网友
本篇文章是对android中跳转进市场的实现代码进行了详细的分析介绍,需要的朋友参考下
 
跳转进市场的代码
复制代码代码如下:

Intent
 intent = new Intent(Intent.ACTION_VIEW);
2 intent.setData(Uri.parse("market://details?id=" +
 getPackageName()));
3 startActivity(intent); 

跳转进市场搜索的代码
复制代码代码如下:

Intent
 intent = new Intent(Intent.ACTION_VIEW);
2 intent.setData(Uri.parse("market://search?q=pub:Your
 Publisher Name"));
3 startActivity(intent); 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表