不想在蜂窝上查看 jpg?
下面是一些在手机上运行良好的代码:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(IMAGEURI, "image/jpg");
startActivity(intent);
在 Honeycomb(3.0 和 3.1)上会抛出这样的错误:
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 }
真的吗?有没有可以在蜂窝上查看jpg的应用程序?真的吗?有人能够在平板电脑上正确执行此操作吗?
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?
JPEG 的 MIME 类型是
image/jpeg
。您有image/jpg
。The MIME type for JPEG is
image/jpeg
. You haveimage/jpg
.