调用已安装市场,打开相应app页面

原文:http://blog.csdn.net/wangfayinn/article/details/10351655

 

觉得以我的记性肯定记不住,收一下。

 

Uri uri = Uri.parse("market://details?id="+getPackageName());  

Intent intent = new Intent(Intent.ACTION_VIEW,uri);  

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  

startActivity(intent); 

调用分享(把内容分享到指定应用):

Intent sendIntent = new Intent();  

sendIntent.setAction(Intent.ACTION_SEND);  

sendIntent.setType("text/*");  

sendIntent.putExtra(Intent.EXTRA_TEXT, contentEditText.getText().toString());  

startActivity(sendIntent); 

posted @ 2014-12-09 10:01  幻次元  阅读(206)  评论(0编辑  收藏  举报