http://ming-fanglin.iteye.com/blog/1061312

//调用浏览器

  1. Uri uri = Uri.parse("");
  2. Intent it  = new Intent(Intent.ACTION_VIEW,uri);
  3. startActivity(it);

//显示某个坐标在地图上

  1. Uri uri = Uri.parse("geo:38.899533,-77.036476");
  2. Intent it = new Intent(Intent.Action_VIEW,uri);
  3. startActivity(it);

//显示路径

  1. Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en");
  2. Intent it = new Intent(Intent.ACTION_VIEW,URI);
  3. startActivity(it);

//拨打电话

  1. Uri uri = Uri.parse("tel:10086");
  2. Intent it = new Intent(Intent.ACTION_DIAL, uri);
  3. startActivity(it);
  4. Uri uri = Uri.parse("tel.10086");
  5. Intent it =new Intent(Intent.ACTION_CALL,uri);
  6. 需要添加 <uses-permission id="android.permission.CALL_PHONE" /> 这个权限到androidmanifest.xml

//发送短信或彩信

  1. Intent it = new Intent(Intent.ACTION_VIEW);
  2. it.putExtra("sms_body", "The SMS text");
  3. it.setType("vnd.android-dir/mms-sms");
  4. startActivity(it);

//发送短信

  1. Uri uri = Uri.parse("smsto:10086");
  2. Intent it = new Intent(Intent.ACTION_SENDTO, uri);
  3. it.putExtra("sms_body", "cwj");
  4. startActivity(it);

//发送彩信

  1. Uri uri = Uri.parse("content://media/external/images/media/23");
  2. Intent it = new Intent(Intent.ACTION_SEND);
  3. it.putExtra("sms_body", "some text");
  4. it.putExtra(Intent.EXTRA_STREAM, uri);
  5. it.setType("image/png");
  6. startActivity(it);

//发送邮件

  1. Uri uri = Uri.parse("mailto:android123@163.com");
  2. Intent it = new Intent(Intent.ACTION_SENDTO, uri);
  3. startActivity(it);
  4. Intent it = new Intent(Intent.ACTION_SEND);
  5. it.putExtra(Intent.EXTRA_EMAIL, android123@163.com);
  6. it.putExtra(Intent.EXTRA_TEXT, "The email body text");
  7. it.setType("text/plain");
  8. startActivity(Intent.createChooser(it, "Choose Email Client"));
  9. Intent it=new Intent(Intent.ACTION_SEND);
  10. String[] tos={"me@abc.com"};
  11. String[] ccs={"you@abc.com"};
  12. it.putExtra(Intent.EXTRA_EMAIL, tos);
  13. it.putExtra(Intent.EXTRA_CC, ccs);
  14. it.putExtra(Intent.EXTRA_TEXT, "The email body text");
  15. it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");
  16. it.setType("message/rfc822");
  17. startActivity(Intent.createChooser(it, "Choose Email Client"));

//播放媒体文件

  1. Intent it = new Intent(Intent.ACTION_VIEW);
  2. Uri uri = Uri.parse("file:///sdcard/cwj.mp3");
  3. it.setDataAndType(uri, "audio/mp3");
  4. startActivity(it);
  5. Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");
  6. Intent it = new Intent(Intent.ACTION_VIEW, uri);
  7. startActivity(it);

//卸载APK

  1. Uri uri = Uri.fromParts("package", strPackageName, null);
  2. Intent it = new Intent(Intent.ACTION_DELETE, uri);
  3. startActivity(it);

//卸载apk 2

  1. Uri uninstallUri = Uri.fromParts("package", "xxx", null);
  2. returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);

//安装APK

  1. Uri installUri = Uri.fromParts("package", "xxx", null);
  2. returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);

//使用系统相机

  1. Intent intent = new Intent("android.media.action,IMAGE_CAPTURE");
  2. startActivity(intent);

//播放音乐

  1. Uri playUri = Uri.parse("file:///sdcard/download/sth.mp3");
  2. returnIt = new Intent(Intent.ACTION_VIEW, playUri);

//发送附近

  1. Intent it = new Intent(Intent.ACTION_SEND);
  2. it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");
  3. it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/cwj.mp3");
  4. sendIntent.setType("audio/mp3");
  5. startActivity(Intent.createChooser(it, "Choose Email Client"));

//market上某个应用信,pkg_name就是应用的packageName

  1. Uri uri = Uri.parse("market://search?q=pname:pkg_name");
  2. Intent it = new Intent(Intent.ACTION_VIEW, uri);
  3. startActivity(it);

//market上某个应用信息,app_id可以通过www网站看下

  1. Uri uri = Uri.parse("market://details?id=app_id");
  2. Intent it = new Intent(Intent.ACTION_VIEW, uri);
  3. startActivity(it);

//调用搜索

    1. Intent intent = new Intent();
    2. intent.setAction(Intent.ACTION_WEB_SEARCH);
    3. intent.putExtra(SearchManager.QUERY,"android123")
    4. startActivity(intent);

隐式调用 Intent 大全, 很全的更多相关文章

  1. Intent(二)隐式调用intent

    在上一节我们一起学习了显示调用Intent,这一节我们来学习如何隐式调用Ingtent.有了这个我们就可以调用其他的线程,或者程序,可以让我们的应用程序变得多彩,如打开网页,拨打电话等. 接下来让我们 ...

  2. JavaScript中valueOf、toString的隐式调用

    今天在群上有人问这样一个问题: 函数add可以实现连续的加法运算函数add语法如下add(num1)(num2)(num3)...;//注意这里是省略号哟,无限使用举例如下:add(10)(10)=2 ...

  3. javascript中你可能遇到的隐式调用

    前言 不知道用隐式调用来形容是否确切,其行为总是隐藏在背后,时不时出来露脸一下,作用貌似不大,但是了解一下还是有用处的,保不准在你的使用下大有作为.所谓的隐式调用简单来说就是自动调用一些方法,而这些方 ...

  4. Windows下动态库的隐式调用

    多年的工作经验告诉我Windows下使用动态库最简单的方法:使用def导出函数,然后隐式调用. 具体做法如下: (1)首先使用visual studio 创建“Win32项目”,如下图: (2)然后在 ...

  5. JavaScript隐藏的坑一,隐式调用toString

    最近在重新学习JavaScript,看动态原型对象的时候,打印了两个用同一个构造函数生成的对象,但是打印结果却不一样,请看代码: var box1=new Box(); console.log(box ...

  6. C++函数模板的显示调用与隐式调用

    C++函数模板可以显示调用与可以隐式调用 首先定义函数模板: template <class T> inline const T& c_max (const T& a, c ...

  7. C++类构造函数、拷贝构造函数、复制构造函数、复制构造函数、构造函数显示调用和隐式调用

    一. 构造函数是干什么的   class Counter   {   public:            // 类Counter的构造函数            // 特点:以类名作为函数名,无返回 ...

  8. 为什么在注册和注销的时候intent要改成隐式调用

    显式意图:调用Intent.setComponent()或Intent.setClass()方法明确指定了组件名的Intent为显式意图,显式意图明确指定了Intent应该传递给哪个组件. 隐式意图: ...

  9. Dll的显式和隐式调用

    建立项目,请选择Win32 控制台项目(Win32 Console Application),选择DLL和空项目选项.DLLs可能并不如你想像的那样难.首先写你的头文件(header file):称为 ...

随机推荐

  1. hud 1019最小公倍数

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1019 思路:头两个数先求,再用所求的数与后面的一个数求,依次类推 #include<stdlib ...

  2. PHP中的常用魔术方法

    魔术方法: 是指某些情况下,会自动调用的方法,称为魔术方法 php面向对象中,提供了这几个魔术方法,他们的特点都是 以双下划线__开头的 __construct()  构造方法 __destruct( ...

  3. python字符串中插入变量

  4. vim 查找时忽略大小写

    :set ic 忽略大小写#ignorecase :set noic 不忽略大小写#noignorecase

  5. C# virtual override 和 new 的区别

    一直以来我都对 virtual  override 和 new 之间的区别感到疑惑不解. 特别笔试的时候特别容易考到,真的很容易弄错啊,畜生! 光看理论永远记不住,那不如写几行代码就懂了. 首先看看v ...

  6. Python win32api提取exe图标icon

    转载地址: http://blog.csdn.net/gumanren/article/details/6129416 代码如下: # -*- coding: utf-8 -*- import sys ...

  7. android 入门-Service

    sdk 1.7 package com.example.hellowrold; import java.util.Random; import com.example.hellowrold.R.id; ...

  8. [Oracle] 生产上表的列类型更新

    由于粗心,数据库脚本生成的时候错将一个类型NUMBER(5)的字段类型改为 VARCHAR2(5) 直接进行表修改会报错,因为数据已经存在,不能进行更新: ); 大体思路如下:       将要更改类 ...

  9. java中 this 和super的用法

    通过用static来定义方法或成员,为我们编程提供了某种便利,从某种程度上可以说它类似于C语言中的全局函数和全局变量.但是,并不是说有了这种便利,你便可以随处使用,如果那样的话,你便需要认真考虑一下自 ...

  10. visio如何让动态连接线的单箭头变成双箭头?

    1 选中线,右击,然后选择“格式”,“线条” 2 3