Android intent crashes

My emulator setup:

AVD: Nexus S

Target: Android 4.2.2

API lvl: 17

When I tried to trigger an activity:

Intent img_gallery_intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

startActivityForResult(img_gallery_intent, MEDIA_IMAGE_REQUEST_CODE);

startActivityForResult would crash with an IllegalArgumentException. The cause for this is unknown in my case but what I realised is that having the camera emulated was causing other crashes. So I removed the camera emulation and the above call works fine now. Bizarre. Hope that helps someone out there as even stackoverflow doesn’t seem to have any listed out.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s