安卓 图片和文字分享
来源:互联网 发布:奇迹暖暖 网络连接失败 编辑:程序博客网 时间:2024/04/30 05:51
private void share(String content, Uri uri){
Intent shareIntent = new Intent(Intent.ACTION_SEND);
if(uri!=null){
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("image/*");
//当用户选择短信时使用sms_body取得文字
shareIntent.putExtra("sms_body", content);
}else{
shareIntent.setType("text/plain");
}
shareIntent.putExtra(Intent.EXTRA_TEXT, content);
//自定义选择框的标题
//startActivity(Intent.createChooser(shareIntent, "邀请好友"));
//系统默认标题
startActivity(shareIntent);
}
Intent shareIntent = new Intent(Intent.ACTION_SEND);
if(uri!=null){
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("image/*");
//当用户选择短信时使用sms_body取得文字
shareIntent.putExtra("sms_body", content);
}else{
shareIntent.setType("text/plain");
}
shareIntent.putExtra(Intent.EXTRA_TEXT, content);
//自定义选择框的标题
//startActivity(Intent.createChooser(shareIntent, "邀请好友"));
//系统默认标题
startActivity(shareIntent);
}
0 0
- 安卓 图片和文字分享
- 安卓分享图片文字链接功能
- android_分享 图片 和 文字
- android_分享 图片 和 文字
- 安卓 文字环绕图片
- 安卓之文字,链接,图片,音乐,分享功能的实现
- 安卓手机分享图片
- 安卓分享纯图片
- Android 文字和图片分享功能
- 安卓图片加载文字模糊解决方法
- 安卓图片文字上传至服务器
- 安卓自定义 View 进阶: 图片文字
- 安卓自定义 View 进阶: 图片文字
- android分享图片文字
- 安卓调用系统自带分享功能分享文字,分享大图片,仿好奇心日报分享长图片(不用申请微信微博官方sdk就能直接分享)
- 安卓控件使用系列2:TextView实现图文(图片和文字)混排
- 完美实现同时分享图片和文字(Intent.ACTION_SEND)
- Android 如何将图片和文字同时分享到微信
- Unity3D渲染优化技巧
- URAL 1375. Bill Clevers
- 利用数组建立栈
- 你还在用QPushButton吗?
- Validate Binary Search Tree
- 安卓 图片和文字分享
- 微信公众号下载媒体文件到个人服务器
- C++ 函数中如何接收数量不定的函数参数
- Qt 无边框、透明、可移动、的个性窗体案例详解
- C++对C加强专题总结:namespace,register,bool,三目运算符,类型检测,struct
- 安卓线程相关 HandlerThread Handler Thread Looper Message Runnable
- 单例模式
- IOS拨打电话方法
- 使用Qt实现简单的图片预览效果