当前位置: 网学 > 编程文档 > Android > 正文

Android Activity/Service Intent 通信 跳转

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/19
下载{$ArticleTitle}原创论文样式
t;sms_body", "The SMS text"); 4. it.setType("vnd.android-dir/mms-sms"); 5. startActivity(it);    1. //传送消息   2. Uri uri = Uri.parse("smsto://0800000123"); 3. Intent it = new Intent(Intent.ACTION_SENDTO, uri); 4. it.putExtra("sms_body", "The SMS text"); 5. startActivity(it);    1. //传送 MMS 2. Uri uri = Uri.parse("content://media/external/images/media/23"); 3. Intent it = new Intent(Intent.ACTION_SEND); 4. it.putExtra("sms_body", "some text"); 5. it.putExtra(Intent.EXTRA_STREAM, uri); 6. it.setType("image/png"); 7. startActivity(it);  传送 Email 1. Uri uri = Uri.parse("mailto:xxx@abc.com"); 2. Intent it = new Intent(Intent.ACTION_SENDTO, uri); 3. startActivity(it);  1. Intent it = new Intent(Intent.ACTION_SEND); 2. it.putExtra(Intent.EXTRA_EMAIL, "me@abc.com"); 3. it.putExtra(Intent.EXTRA_TEXT, "The email body text"); 4. it.setType("text/plain"); 5. startActivity(Intent.createChooser(it, "Choose Email Client"));  1. Intent it=new Intent(Intent.ACTION_SEND);     2. String tos={"me@abc.com"};     3. String ccs={"you@abc.com"};     4. it.putExtra(Intent.EXTRA_EMAIL, tos);     5. it.putExtra(Intent.EXTRA_CC, ccs);     6. it.putExtra(Intent.EXTRA_TEXT, "The email body text");     7. it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");     8. it.setType("message/rfc822");     9. startActivity(Intent.createChooser(it, "Choose Email Client"));    1. //传送附件 2. Intent it = new Intent(Intent.ACTION_SEND); 3. it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text"); 4. it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3"); 5. sendIntent.setType("audio/mp3"); 6. startActivity(Intent.createChooser(it, "Choose Email Client"));    播放多媒体    Uri uri = Uri.parse("file:///sdcard/song.mp3");    Intent it = new Intent(Intent.ACTION_VIEW, uri);    it.setType("audio/mp3");    startActivity(it);         Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");    Intent it = new Intent(Intent.ACTION_VIEW, uri);     startActivity(it);      Market 相关 1.        //寻找某个应用   2.        Uri uri = Uri.parse("market://search?q=pname:pkg_name");   3.        Intent it = new In
  • 上一篇资讯: 通过AIDL调用Service
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号