Android APP拨打电话:

Intent intent=new Intent(Intent.ACTION_DIAL,Uri.parse("tel:"+110));

startActivity(intent);

}

Android APP打开电话薄:

Intent intent = new Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI);

startActivity(intent);

Android APP短信分享:

Intent sendIntent = new Intent(Intent.ACTION_VIEW);

sendIntent.putExtra("sms_body", "#短信分享#");

sendIntent.setType("vnd.android-dir/mms-sms");

startActivity(sendIntent);

打开手机的分享功能:

Intent sendIntent = new Intent(Intent.ACTION_SEND);

//   sendIntent.setType("image/png");//图片

// File f = new File(Environment.getExternalStorageDirectory() + "/Pictures/2.png");

// Uri u = Uri.fromFile(f);

// sendIntent.putExtra(Intent.EXTRA_STREAM, u);

  sendIntent.setType("text/plain");//文字

  sendIntent.putExtra(Intent.EXTRA_SUBJECT, "#好友分享#");

// 自己主动加入的发送的详细信息  

  sendIntent.putExtra(Intent.EXTRA_TEXT, "我如今正在玩应用,一起增加吧。很多其它资讯详见:http://www.xx.com");  

  sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  

  startActivity(Intent.createChooser(sendIntent, getTitle()));

打开应用商店进行评价:

Uri uri=Uri.parse("market://details?

id=" + Activity.this.getPackageName());

Intent intent=new Intent(Intent.ACTION_VIEW, uri);

PackageManager pm = SettingActivity.this.getPackageManager();

List<ResolveInfo> list = pm.queryIntentActivities(intent, 0);

if(list.size()==0){

Toast.makeText(SettingActivity.this, "还未安装软件商店", Toast.LENGTH_SHORT).show();

}else{

startActivity(intent);

}

创建桌面快捷图标:

//发送广播的意图,要创建快捷图标了
Intent intent = new Intent();
intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
//快捷方式 要包括3个重要的信息 1,名称 2.图标 3.干什么事情
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "仔仔手机安全卫士");
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));
//桌面点击图标相应的意图。 Intent shortcutIntent = new Intent();
shortcutIntent.setAction("android.intent.action.MAIN");
shortcutIntent.addCategory("android.intent.category.LAUNCHER");
shortcutIntent.setClassName(getPackageName(), "com.zaizai.safty.MainActivity");
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
sendBroadcast(intent);
需加入权限
com.android.launcher.permission.INSTALL_SHORTCUT

MIME TYPE对比表:http://tool.oschina.net/commons       http://blog.sina.com.cn/s/blog_446cc66b0100ublv.html

Android APP代码拨打电话、打开手机分享功能等隐式意图的更多相关文章

  1. android 21 隐式意图启动系统预定义activity

    Intent intent=new Intent(LoginActivity.this, MainActivity.class);//显示意图启动,显示从一个activity到另一个activity, ...

  2. 无废话Android之smartimageview使用、android多线程下载、显式意图激活另外一个activity,检查网络是否可用定位到网络的位置、隐式意图激活另外一个activity、隐式意图的配置,自定义隐式意图、在不同activity之间数据传递(5)

    1.smartimageview使用 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&q ...

  3. [android] 隐式意图和显式意图的使用场景

    激活系统的某些应用,并且往应用里面填一些数据,比如说短信应用 打开短信应用,查看logcat,找到ActivityManager, 看到Display.com.android.mms/.ui.Comp ...

  4. 03_隐式意图打开activity

    想让第一个activity把第二个activity打开的话,在清单文件里面声明一下并且 右键Debug As Android Application居然没有报错 mimeType  讲HTML的时候就 ...

  5. Android开发学习笔记:浅谈显示Intent和隐式Intent

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://liangruijun.blog.51cto.com/3061169/655132 ...

  6. Android 隐式意图激活另外一个Actitity

    上篇文章<Android 显示意图激活另外一个Actitity>最后谈到显示意图激活另外一个Actitity会有一些局限性和弊端 本文介绍另一种方法:隐式意图激活另外一个Actitity ...

  7. Android 显示意图和隐式意图的区别

    意图在android的应用开发中是很重要的,明白了意图的作用和使用后,对开发会有很大帮助.如果没有把意图搞懂,以后开发应用会感觉缺些什么.        意图的作用:        1.激活组件   ...

  8. Android的显示意图和隐式意图总结

    显示意图 简而言之: 通过指定特定Activity的包名和类名开启Activity 应用场景: 一般应用于本App内的activity间的跳转. XML配置信息: AndroidManifest.xm ...

  9. Android 隐式意图的配置

    本文地址:http://www.cnblogs.com/wuyudong/p/5677473.html,转载请注明源地址. <Android 显示意图激活另外一个Actitity>一文介绍 ...

随机推荐

  1. PB数据管道

    数据管道提供了一种不同数据库之间传递数据和(或)表结构的方法. 数据管道对象 要完毕数据管道的功能须要提供例如以下内容: 须要数据源和目标数据库,并可以和这两个数据库正常联接 须要源数据库中的哪些表: ...

  2. SQL Server 存储过程、触发器、游标

    存储过程 1.存储过程是事先编好的.存储在数据库中的程序,这些程序用来完成对数据库的指定操作. 2.系统存储过程: SQL Server本身提供了一些存储过程,用于管理有关数据库和用户的信息. 用户存 ...

  3. FastDFS的学习与使用(大量帖子)

    http://www.oschina.net/p/fastdfs http://bbs.chinaunix.net/forum-240-1.html

  4. 用WebCollector制作一个爬取《知乎》并进行问题精准抽取的爬虫(JAVA)

    简单介绍: WebCollector是一个无须配置.便于二次开发的JAVA爬虫框架(内核),它提供精简的的API.仅仅需少量代码就可以实现一个功能强大的爬虫. 怎样将WebCollector导入项目请 ...

  5. android录音功能的实现

    这个录音实现是我在Bus上看到并下载的,他那个源码不完整,再次把我整理完整的代码贴出,源码地址在这:http://download.csdn.net/detail/chaozhung/5618649 ...

  6. Qt遍历图片文件

    原地址:http://blog.sina.com.cn/s/blog_5c70dfc80100tgff.html //实现遍历某个文件下的图片文件 //如果想遍历其余类型文件,方法也一样,只需简单修改 ...

  7. perl EXPORT模块

    Exporter - Implements default import method for modules 实现模块的默认导出方法: 简介: [tomcat@wx03 ~]$ cat hui.pm ...

  8. 如何在SourceInsight中选中匹配的大括号中的内容

    如何在SourceInsight中选中匹配的大括号中的内容 要分析的代码很长,多个for,if等分析嵌套在一起,代码有点乱,找到了这个分支的头,却不知道尾在哪,找到了尾却不知道哪是开头,在网上找了一下 ...

  9. Unity3D手游-横版ACT游戏完整源代码下载

    说明: 这不是武林.这不是江湖,没有道不完的恩怨,没有斩不断的情仇,更没有理不清的烦恼,这是剑的世界,一代剑魁闯入未知世界,将会为这个世界展开什么样的蓝图.让你来创造它的未来,剑魁道天下,一剑斗烛龙! ...

  10. ASP.NET - 记录错误日志

    不需要像log4net/Nlog/Common Logging配置,简单好用. 不用增加声明logger对象,可记录当前执行状况. 可以定义 维护功能模板的开发人员,以便用功能模块对于开发人员. 出处 ...