IM学习——图片消息的实现01

mac2022-06-30  22

大佬博客

按过程首先要选择图片,一下是代码 API

Intent intent = new Intent();// new 一个Intent对象 intent.setAction(Intent.ACTION_GET_CONTENT);//设置action属性, intent.addCategory(Intent.CATEGORY_OPENABLE);//设置Category属性, intent.setType("image/*");// 设置类型 startActivity(intent);// 启动该活动
其他:

1、ACTION_GET_CONTENT:允许用户选择特定种类的数据,并返回其URI(特殊种类的数据:照一张相片或录一段音)。 2、URI, 全称 (Uniform Resource Indentifier) 统一资源标识符, 用于某一标识某一资源名称的字符串。 3、

最新回复(0)