Reputation: 112769
My app creates an intent, and it then creates a chooser intent from it. If there is no app to handle the intent, the chooser intent creates a dialog to inform the user. I would like my app to get notified of this fact, either with an exception or some other way. Is it possible?
I think I could query if there are activities suitable for my original intent using queryIntentActivities()
. Would that be a good solution? Would it be too slow to use it on the UI thread? Is there a better way?
Upvotes: 0
Views: 337
Reputation: 1007554
I think I could query if there are activities suitable for my original intent using queryIntentActivities(). Would that be a good solution?
Sure. If that returns an empty list, you know the chooser will not have any options.
Would it be too slow to use it on the UI thread?
Not that I am aware of.
Is there a better way?
Have someone else write the call to queryIntentActivities()
for you, while you relax. :-)
Upvotes: 2