Exception occurs for some users with email contact picker
android
Solution
Not exactly the solution you are looking for but the same thing used to happen for me too when using the ACTION_PICK intent to select an application. Usually, what would happen is that the activity would take a long time to launch for no (apparent) reason and sometimes just crash with "No Activity Found" exception. What I ended up doing is building my own activity that lists the available apps. In your case, you could probably do the same for contacts using a cursor to query all the contacts with email and showing a dialog/activity to allow user selection. Sounds like an awful workaround but might be the fastest to implement... (See sample code here)
Another way to go, would be to contact those users and see if they have a custom contacts app that might not support the `ContactsContract.CommonDataKinds.Email.CONTENT_URI` content type.
Problem
I am trying to allow my users to select a contact from among their contacts that have email addresses. This is the code that is executed when they click the appropriate button: ``` Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Email.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT); ``` This is working just fine on my own phone, but after releasing my app I'm seeing the following exception occur for some of my users: ``` 0 android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK dat=content://com.android.contacts/data/emails } 1 at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1638) 2 at android.app.Instrumentation.execStartActivity(Instrumentation.java:1510) 3 at android.app.Activity.startActivityForResult(Activity.java:3244) 4 at com.fitrocket.android.InviteMethodSelectionAct.onClick(InviteMethodSelectionAct.java:59) 5 at android.view.View.performClick(View.java:3549) 6 at android.view.View$PerformClick.run(View.java:14400) 7 at android.os.Handler.handleCallback(Handler.java:605) 8 at android.os.Handler.dispatchMessage(Handler.java:92) 9 at android.os.Looper.loop(Looper.java:154) 10 at android.app.ActivityThread.main(ActivityThread.java:4945) 11 at java.lang.reflect.Method.invokeNative(Native Method) 12 at java.lang.reflect.Method.invoke(Method.java:511) 13 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 14 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 15 at dalvik.system.NativeStart.main(Native Method) ``` I haven't been able to reproduce this myself so I'm wondering if anyone could tell me what the problem may be?