[英]Find package name for Android apps to use Intent to launch Market app from web
[英]Is there an intent to launch Android Market to “My Apps” page?
正如標題所說。 是否有意在“我的應用程序”頁面上推出 android 市場? 如果應用程序已過期,我會顯示一個對話框。 我想在直接指向“我的應用程序”頁面的對話框上放置一個按鈕,以便用戶可以下載更新。
編輯:為清楚起見,我不是在談論我的應用程序的詳細信息頁面。 我說的是 Android Market 應用程序的“我的應用程序”部分。
請參閱: http://developer.android.com/guide/publishing/publishing.html#marketintent了解您想知道的一切。
編輯:試試這個。 請注意,如果更新市場應用程序以使用不同的活動,這可能會改變。
Intent i = new Intent("android.intent.action.VIEW");
i.setComponent(new ComponentName("com.android.vending","com.android.vending.MyDownloadsActivity"));
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
到目前為止,這個解決方案在許多 Gplay 版本中都完美地為我工作。 這是一個摘要:
Intent intent = new Intent("com.google.android.finsky.VIEW_MY_DOWNLOADS");
intent.setClassName("com.android.vending", "com.google.android.finsky.activities.MainActivity");
startActivity(intent);
最新版本的 Play 商店應用程序是基於片段的。 您無法打開“我的應用程序”,因為它托管在與片段的 rest 相同的活動中。 您可以做的最好的事情是打開主要活動並讓用戶導航到“我的應用程序”。
Intent marketIntent = new Intent(Intent.ACTION_VIEW)
.setComponent(new ComponentName("com.android.vending",
"com.google.android.finsky.activities.MainActivity"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(marketIntent);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.