從 APP 中執行外部 APP
從 APP 中執行外部 APPIntent intent = getPackageManager().getLaunchIntentForPackage("com.iiordanov.freebVNC");startActivity(intent);從 APP 中執行外部的 APP,如果APP不存在,則開啟Google Play APP頁面,再沒有則開啟Google Play網頁版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);
}Reference:
從 APP 中執行外部的 APP
http://ephrain.pixnet.net/blog/post/47249290-%5Bandroid%5D-android-%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98%EF%BC%9A%E5%BE%9E-app-%E4%B8%AD%E5%9F%B7%E8%A1%8C%E5%A4%96%E9%83%A8%E7%9A%84-
開啟 Google Play app 至指定的 app
http://ephrain.pixnet.net/blog/post/47272322
頁:
[1]