【问题标题】:ContentType for image in AndroidAndroid中图像的ContentType
【发布时间】:2015-12-26 11:55:25
【问题描述】:

我用过

contentType.equalsIgnoreCase("image/png");

用于接收png 图像。但我需要获取所有格式的任何图像。那么如何为所有格式声明contentType

【问题讨论】:

  • 你可以试试"image/*"

标签: android android-intent mime-types


【解决方案1】:

您可以尝试使用 "image/*",它将接受所有类型的图像。

阅读文档here

【讨论】:

  • 请展开问题。你实际上想做什么。从哪里接收图像?
  • 这是聊天应用程序,我们在其中发布和接收图像作为附件。我可以收到图像,但图像不显示。
  • 你的问题还不清楚,贴出你的代码,解释一下。更新问题
【解决方案2】:

尝试image/* 而不是"image/png"

【讨论】:

    猜你喜欢
    • 2010-11-17
    • 1970-01-01
    • 2017-04-20
    • 1970-01-01
    • 2012-09-20
    • 2015-09-25
    • 1970-01-01
    • 2014-10-19
    • 2014-07-07
    相关资源
    最近更新 更多