case R.id.ib_zixundetail_fenxiang: String txt= "给您分享一个不错的内容:title(http://www.baidu.com)"; Intent intent=new Intent(Intent.ACTION_SEND); intent.s...
分类:
其他好文 时间:
2015-09-29 20:20:20
阅读次数:
157
分享动态储存;ShareActionProvider actionProvider = (ShareActionProvider) item1.getActionProvider();Intent shareIntent=new Intent(Intent.ACTION_SEND);shareInt...
分类:
其他好文 时间:
2015-09-26 17:17:25
阅读次数:
222
private?void?share(String?content,?Uri?uri){?? ????Intent?shareIntent?=?new?Intent(Intent.ACTION_SEND);??? ????if(uri!=null){?? ????????shareIntent.putExtra(Intent.E...
分类:
其他好文 时间:
2015-09-14 19:47:14
阅读次数:
140
Intent过滤器我们的app的功能可能对别的app也有用,那么我们的app应该做好响应其他APP的准备。例如,一个社交app,它可以分享信息或者照片给好友,那么最好我们的app能够接收ACTION_SEND的intent,这样当用户在其他app触发分享功能的时候,我们的app也能够出现在待选对话框。通过在manifest文件中的标签下添加属性,能使...
分类:
移动开发 时间:
2015-08-25 21:46:59
阅读次数:
183
android 系统的分享功能
private void share(String content, Uri uri){
Intent shareIntent = new Intent(Intent.ACTION_SEND);
if(uri!=null){
//uri 是图片的地址
shareIntent.putExtra(Intent.EXTRA_S...
分类:
移动开发 时间:
2015-06-03 13:48:45
阅读次数:
214
APP必备小功能,代码很简单,1 Intent intent=new Intent(Intent.ACTION_SEND); 2 intent.setType("text/plain"); //"image/*"3 intent.putExtra(In...
分类:
移动开发 时间:
2015-06-02 19:27:11
阅读次数:
111
分享的方法: private void? nativeShare() { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, "分享内容。。。。。"); startActivity(Int...
分类:
移动开发 时间:
2015-05-26 19:20:42
阅读次数:
152
为了应用的推广,我们经常看到点击分享按钮会出现,比如微博微信等应用的分享二等列表,这是如何实现的呢?这一篇将要详细的介绍。
android的实现分享是通过隐式的启动activity。分享文本1.action是action_send,相应的代码:Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);...
分类:
移动开发 时间:
2015-05-04 08:40:11
阅读次数:
181
我们知道在Android中系统有很多自带的ACTION(动作/活动),通过Intent中添加ACTION信息,可以实现很多系统功能,如打开相册,拍照,发信息等。在工作中,经常用到ACTION_SEND这个ACTION,就做个小小的总结,记录下来。
1,发邮件:
Uri uri= Uri.parse("content://media/external/images/media/23");
...
分类:
移动开发 时间:
2015-04-07 12:07:56
阅读次数:
132
//分享文字
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, "要分享的文本。");
intent.setType("text/plain");
startActivity(Intent.createChooser(intent, "分享"));
//分享图片
Uri uri =...
分类:
其他好文 时间:
2015-03-11 10:53:31
阅读次数:
162