源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Android开发中应用程序分享功能实例

  • 时间:2022-01-30 08:36 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Android开发中应用程序分享功能实例
本文实例讲述了Android开发中应用程序分享功能。分享给大家供大家参考,具体如下:
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
//设置类型
shareIntent.setType("text/plain");
//设置分享的主题
shareIntent.putExtra("android.intent.extra.SUBJECT", "分享");
shareIntent.putExtra(Intent.EXTRA_TEXT, "推荐你使用一个程序:"+infos.get(position).getAppName());
shareIntent = Intent.createChooser(shareIntent, "分享");
startActivity(shareIntent);
Log.i(TAG, infos.get(position)+"分享");
break;

更多关于Android相关内容感兴趣的读者可查看本站专题:《[url=http://www.1sucai.cn/Special/410.htm]Android开发入门与进阶教程[/url]》、《[url=http://www.1sucai.cn/Special/383.htm]Android通信方式总结[/url]》、《[url=http://www.1sucai.cn/Special/381.htm]Android基本组件用法总结[/url]》、《[url=http://www.1sucai.cn/Special/375.htm]Android视图View技巧总结[/url]》、《[url=http://www.1sucai.cn/Special/371.htm]Android布局layout技巧总结[/url]》及《[url=http://www.1sucai.cn/Special/124.htm]Android控件用法总结[/url]》 希望本文所述对大家Android程序设计有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部