I have created Intent chooser for my application. I want to send email and sms by this. My code is here http://pastie.org/8966227 . But I can get the result properly. The control always comes into second loop only. Any body can help me? thanks in advance.
Asked
Active
Viewed 450 times
0
-
What does "control always comes into second loop only mean"? what problem you are facing? – Jitender Dev Mar 25 '14 at 05:17
-
which means I have set emailIntent.putExtra(Intent.EXTRA_TEXT, "Hi welcome to android!!!!!!!!!!!!!"); for email and emailIntent.putExtra(Intent.EXTRA_TEXT, "Hi welcome to IPhnoe!!!!!!!!!!!!!"); for sms. But when i selecting gmail or sms the second text only applied. – malavika Mar 25 '14 at 05:18
-
You need "Hi welcome to android" for email and "Hi welcome to IPHONE" for sms right? – Jitender Dev Mar 25 '14 at 05:22
1 Answers
1
You can't check which intent has user selected.
Unless you create your own implementation of the dialog for the activity selection.
To create such dialog you need to use PackageManager and its queryIntentActivities() function. The function returns List.

Community
- 1
- 1

Jitender Dev
- 6,907
- 2
- 24
- 35