String sParam = "com.google.android.apps.plus";
try
{
// Open app with Google Play app
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+sParam));
startActivity(intent);
}
catch (android.content.ActivityNotFoundException anfe)
{
// Open Google Play website
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id="+sParam));
startActivity(intent);
}
格式化
廣告
文章分類
廣告2
2013年8月8日 星期四
[Android SDK特色教學] 意圖Intent Play app至指定的package
有安裝google play的話就開啟程式,如果沒有的話就開啟網頁版的
訂閱:
張貼留言
(
Atom
)
沒有留言 :
張貼留言