Android之——原生分享功能
16lz
2021-01-23
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/47175469
不多说,不废话,直接上代码,大家看了都懂得
/** * Android原生分享功能 * @param appName:要分享的应用程序名称 */private void share(String appName) {Intent share_intent = new Intent();share_intent.setAction(Intent.ACTION_SEND);share_intent.setType("text/plain");share_intent.putExtra(Intent.EXTRA_SUBJECT, "f分享");share_intent.putExtra(Intent.EXTRA_TEXT, "HI 推荐您使用一款软件:" + appName);share_intent = Intent.createChooser(share_intent, "分享");startActivity(share_intent);}
更多相关文章
- Android应用程序目录结构分析
- Android应用程序开发的五大概念
- Android应用程序内存分析-Memory Analysis for Android Applicat
- 面试例题1:如何在android应用程序的窗口上绘制图形
- 用Eclipse开发第一个Android应用程序HelloWorld
- Building Android Apps with AWS 使用AWS构建Android应用程序 Ly