android - 如何创建处理打开照片的 Intent ?

标签 android image intentfilter

我有我的 android 应用程序 list 文件,并且我创建了一个新 Activity 。我希望此 Activity 能够像内置图像查看器一样处理图像。所以我可以在浏览器中点击一个图像,它会询问我是否要使用我的应用程序或默认 Activity 来查看图像。我可以在以下 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但我不知道哪个是用来查看图像的。

最佳答案

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

Intent.html#ACTION_VIEW

关于android - 如何创建处理打开照片的 Intent ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20159047/

相关文章:

android - 模拟每个 { ... } block 内的缺失调用

image - Bootstrap 不同形状的图像

ios - 图像不适合 tableview 下的 imageview 框架,使用 AsynchImageView 从 URL 下载

css - 相对定位的 div 内的绝对定位淡入淡出图像不起作用

android - 深层链接启动应用程序但说 uri 为空

android - BroadcastReceiver 和 IntentFilter 有什么区别?

android - 如何在 intent-filter 的数据标签中指定方案特定部分?

android - 无法解析模块 `AccessibilityInfo`

android - 在 android 中检测 CDMA 手机上的漫游

c# - WPF 中的图标混合动画