封装为一个方法

1.跳转到拨号页面

 //跳转到拨号页面的方法
protected void takeCall(String info){
Intent intent=new Intent();
intent.setData(Uri.parse("tel://"+info));
intent.setAction(Intent.ACTION_DIAL);
startActivity(intent);
}

此时参数info即为传入的号码,点击按钮(在此按钮的监听器中添加takeCall方法),就可到拨号页面

2.跳转到网页界面

 //跳转网页的方法
protected void takeCall(String info){
Intent intent=new Intent();
intent.setData(Uri.parse("http://"+info));
intent.setAction(Intent.ACTION_VIEW);
startActivity(intent);
}

3.跳转到信息界面

 //跳转信息页面的方法
protected void takeCall(String info){
Intent intent=new Intent();
intent.setData(Uri.parse("smsto:"+info));
intent.setAction(Intent.ACTION_SENDTO);
startActivity(intent);
}

Intend之Date的几个功能的更多相关文章

  1. 扩展JS Date对象时间格式化功能

    在自己JS代码中引入一下代码: Date.prototype.format =function(format) { var o = { "M+" : this.getMonth() ...

  2. JAVA常用API(Date、DateFormat、Calendar、System、Math、基本数据类型包装类)

    注:本文所有内容均属个人见解,如有错误望各位大佬好心指点批评,不胜感激 本章重点单词: parse:解析 format:格式化 pattern:模式 amount:数量 filed :领域 1.Dat ...

  3. javascript功能插件大集合,写前端的亲们记得收藏

    伯乐在线已在 GitHub 上发起「JavaScript 资源大全中文版」的整理.欢迎扩散.欢迎加入. https://github.com/jobbole/awesome-javascript-cn ...

  4. 00007 - Linux时间date命令详解

    1.命令:date 2.命令功能:date 可以用来显示或设定系统的日期与时间. 3.命令参数 -d<字符串>:显示字符串所指的日期与时间.字符串前后必须加上双引号: -s<字符串& ...

  5. Spring 系列教程之容器的功能

    Spring 系列教程之容器的功能 经过前面几章的分析,相信大家已经对 Spring 中的容器功能有了简单的了解,在前面的章节中我们一直以 BeanFacotry 接口以及它的默认实现类 XmlBea ...

  6. Date与String间的转换

    一.Date-->String :格式化过程 1. DateFormat :String format(Date d) 2.SimpleDateFormat是继承DateFormat(抽象类)的 ...

  7. 每天一个Linux命令(32)date命令

          date命令是显示或设置系统时间与日期.        (1)用法:       用法:  date [选项]  [参数]       (2)功能:       功能:  根据指定格式显示 ...

  8. Linux date命令的用法(转)

    1.命令:date 2.命令功能:date 可以用来显示或设定系统的日期与时间. 3.命令参数 -d<字符串>:显示字符串所指的日期与时间.字符串前后必须加上双引号: -s<字符串& ...

  9. Date、Calendar和GregorianCalendar的使用

    java.util 包提供了 Date 类来封装当前的日期和时间. Date 类提供两个构造函数来实例化 Date 对象. 第一个构造函数使用当前日期和时间来初始化对象. Date public st ...

随机推荐

  1. 搭建一个ssm框架的maven项目需要配置的文件

    单独功能需要的配置文件: 1,mybatis配置文件      mybatis-config.xml2,spring配置文件        spring-context.xml  ......3,we ...

  2. Excel实用知识1

    纯手打,可能有错别字,使用的版本是office2013 转载请注明出处 http://www.cnblogs.com/hnnydxgjj/p/6329509.html ,谢谢 使用现成的模板 ”开头的 ...

  3. centos解决bash: telnet: command not found...&& telnet: connect to address 127.0.0.1: Connection refused拒绝连接

    检查telnet是否已安装: [root@hostuser src]# rpm -q telnet-serverpackage telnet-server is not installed[root@ ...

  4. The property does not exist in XML namespace

    自定义依赖属性,绑定在xaml文件中,无问题. 但是编译失败,报 The property does not exist in XML namespace 错误. 发现如果依赖属性定义在本程序集中,在 ...

  5. vagrant up启动centos7时出现"rsync" could not be found on your PATH. Make sure that rsyncis properly ins

    (1)问题1:"rsync" could not be found on your PATH. Make sure that rsyncis properly ins 解决方法: ...

  6. win8.1 virtualbox 安装centos7注意事项

    win8.1是64位的,一开始在virtualbox中选择版本时,怎么也选不到64位的,这时要改BIOS设置,把CPU虚拟化改为允许. virtualbox是32位的,没必要非得是64位(64位的也不 ...

  7. 2019年ipa发布苹果应用商店审核指南

    https://baijiahao.baidu.com/s?id=1623886553597961077&wfr=spider&for=pc ipa 发布审核指南 说明: 本指南为初版 ...

  8. 解决安装PyMySQL一直停在Building wheels for collected package:cryptography, cffi, pycparser的问题

    我的运行环境为: 硬件:树莓派3b 系统:ubuntu_meta_16.04.2 因为项目需要,我在树莓派上搭建了基于python编程的Django的web框架,需要从MySQL中读取树莓派以及传感器 ...

  9. Python学习笔记008

    while循环 while 条件 : 执行 num =1 while num<=10:    print(num)    num+=1 1-100偶数 方法1 num =2 while num& ...

  10. 各种STL的基本用法

    目录 STL及一些常用函数的基本用法 1.vector(向量)的基本用法 2.queue(队列)的基本用法 3.stack(栈)的基本操作 4.set(集合)的基本用法 5.map(映射)的基本用法 ...