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. UVA 624 CD

    主要是打印路径有点麻烦,然后就是用于标记的数组要开大点,不然会狂wa不止,而且还不告诉你re #include <cstdio> #include <iostream> #in ...

  2. MVC缓存03,扩展方法实现视图缓存

    关于缓存,先前尝试了: ● 在"MVC缓存01,使用控制器缓存或数据层缓存"中,分别在控制器和Data Access Layer实现了缓存 ● 在"MVC缓存02,使用数 ...

  3. Delphi面向对象的属性

    可以把属性看成是能对类中的数据进行修改和执行代码的特殊的辅助域.对于组件来说,属性就是列在Object Inspector窗口的内容.下面的例子定义了一个有属性的简单对象 TMyObject = cl ...

  4. djcelery的细节篇

    http://blog.csdn.net/samed/article/details/50598371 随时撸一撸,要点记心间.. 1. 下面讲解一下celery.py文件的配置内容,为何要这么配置. ...

  5. 自制工具:迅速打开一个Node 环境的Playground

    需求 经常有这种情况,写代码的时候需要实验种想法,亟需一种playground 环境来玩耍.如果是前端的话可以打开chrome 的控制台,但是如果是Node 的话就比较麻烦了.我要打开我的存放试验代码 ...

  6. Tabular Model下的ADOMD.NET

    ADOMD.NET是一套对象架构体系,它包含需要向SSAS数据库做访问的一切支持的对象和方法.很多微软官方以及第三方的SSAS客户端应用都是通过这个对象来操作数据. 多维模式的ADOMD.NET在我以 ...

  7. scala中的抽象类

    scala中也有和java,c#类似的抽象类,抽象类会有部分实现,也有没有实现的方法定义.抽象类最大的特征是不能直接实例化.下面我们看个例子. abstract class Animal { def ...

  8. hdu 4753 2013南京赛区网络赛 记忆化搜索 ****

    看到范围基本可以想到dp了,处理起来有点麻烦 #include<iostream> #include<cstdio> #include<cstring> #incl ...

  9. 智能车学习(十一)——陀螺仪学习

    一.学习说明 感觉就是配置I2C通信,然后直接移植51代码... 二.代码分享: 1.头文件: #ifndef I2C_GYRO_H_ #define I2C_GYRO_H_ /*********** ...

  10. jdk 1.8 Executors

    Class Executors java.lang.Object java.util.concurrent.Executors public class Executors extends Objec ...