Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no intent to view jpg on honeycomb?

Here's a bit of code which works fine on phones:

Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(IMAGEURI, "image/jpg");
startActivity(intent);

which on Honeycomb (3.0 and 3.1) throws this:

E/AndroidRuntime(25629): FATAL EXCEPTION: main
E/AndroidRuntime(25629): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=content://media/external/images/media/282 typ=image/jpg }

Really? There's no application to view jpg on honeycomb? Really? Has anyone been able to do this properly on a tablet?

like image 242
Jens Zalzala Avatar asked Jul 04 '11 15:07

Jens Zalzala


1 Answers

The MIME type for JPEG is image/jpeg. You have image/jpg.

like image 85
CommonsWare Avatar answered Sep 30 '22 15:09

CommonsWare