Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You'll have to create your own chooser dialog merging both intent resolution results.</p> <p>To do this, you will need to query the PackageManager with <a href="http://d.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent,%20int)" rel="nofollow noreferrer">PackageManager.queryIntentActivities()</a> for both original intents and create the final list of possible Intents with one new Intent for each retrieved activity like this:</p> <pre><code>List&lt;Intent&gt; yourIntentsList = new ArrayList&lt;Intent&gt;(); List&lt;ResolveInfo&gt; listCam = packageManager.queryIntentActivities(camIntent, 0); for (ResolveInfo res : listCam) { final Intent finalIntent = new Intent(camIntent); finalIntent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name)); yourIntentsList.add(finalIntent); } List&lt;ResolveInfo&gt; listGall = packageManager.queryIntentActivities(gallIntent, 0); for (ResolveInfo res : listGall) { final Intent finalIntent = new Intent(gallIntent); finalIntent.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name)); yourIntentsList.add(finalIntent); } </code></pre> <p>(I wrote this directly here so this may not compile)</p> <p>Then, for more info on creating a custom dialog from a list see <a href="https://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog" rel="nofollow noreferrer">https://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload