Android分享—调用系统自带的分享功能
实现分享功能的几个办法
1.调用系统的分享功能
2.通过第三方SDK,如ShareSDK,友盟等
3.自行使用各自平台的SDK,比如QQ,微信,微博各自的SDK
Android调用系统分享文本信息、单张图片、多个文件和指定分享到微信、QQ的实例代码:
同时分享图片和文字
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, "邀请好友"));
//系统默认标题
}
TPLink TLWDR4320 无线路由器IP带宽控制功能分配带宽设置方法
SQL Server 2008及更高版本数据库恢复做法之日志尾部备份实用指南
TPLink TLWDR4320 无线路由器控制管控小孩上网行为设置
TPLink TLWDR4320 无线路由器打印服务器设置指南
TPLink TLWDR8620 52 无线路由器当作交换机使用教程
TPLink TLWDR8620 52 无线路由器映射服务器到外网操作方法