[英]How to open instagram launcher activity from another app
Intent hashtagIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("com.instagram.android"));
startActivity(hashtagIntent);
我正在嘗試從我的應用程序啟動instagram應用程序。 我已經嘗試了上面的代碼,但是無法打開Instagram應用程序。
嘗試這個
絕對可以幫到您
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.instagram.android");
if (launchIntent != null)
{
try
{
startActivity(launchIntent);
}
catch (ActivityNotFoundException ex) // in case Instagram not installed in your device
{
ex.printStackTrace();
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.