如何创建处理打开照片的意图?

时间:2013-11-23 05:46:18

标签: android image intentfilter

我有我的Android应用程序清单文件,我做了一个新的活动。我希望此活动能够像内置图像查看器一样处理图像。所以我可以在浏览器中点击一个图像,它会询问我是否要使用我的应用程序或默认活动来查看图像。我可以在以下intent过滤器中使用什么操作:

<intent-filter>
    <action android:name="android.intent.action." />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
</intent-filter>

我认为它会列在http://developer.android.com/reference/android/content/Intent.html,但我无法弄清楚哪一个是用于查看图像。

1 个答案:

答案 0 :(得分:1)

您正在寻找android.intent.action.VIEW

Intent.html#ACTION_VIEW

相关问题