开发者

no intent to view jpg on honeycomb?

开发者 https://www.devze.com 2023-03-17 08:54 出处:网络
Here\'s a bit of code which works fine on phones: Intent intent = new Intent(); intent.setActio开发者_开发知识库n(Intent.ACTION_VIEW);

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

Intent intent = new Intent();
intent.setActio开发者_开发知识库n(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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消