Get user selection from intent chooser
Sep 3, 2018 · 1 min read
This article shows how can we know user decision on intent chooser you created.
- requirement: Android 5.1+
If you want know which app was selected by user when showing intent chooser, you should implement the chooser with IntentSender that will callback the user selection.
IntentSender is created from PendingIntent. It means you can/should launch Service or BroadcastReceiver instead of your Activity to prevent interrupting the user operation on the selected app.
Receiver or Service can extract ComponentName as Parcelable from Intent. You can get class name or package name from it.
