封装为一个方法

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. window.onresize

    $(function() { window.onresize = function() { alert("abc"); }; window.onresize = function( ...

  2. ASP.NET Core搭建多层网站架构【1-项目结构分层建立】

    2020/01/26, ASP.NET Core 3.1, VS2019 摘要:基于ASP.NET Core 3.1 WebApi搭建后端多层网站架构[1-项目结构分层建立] 文章目录 此分支项目代码 ...

  3. 《JavaScript高级程序设计》读书笔记(三)基本概念第三小节 String、Object类型

    内容---语法 上一小节---数据类型 本小节 String类型---流程控制语句---理解函数 String类型--零个或者多个16位Unicode字符组成字符序列,即字符串--可以由双引号&quo ...

  4. Protobuf协议--java实现

    Protobuf协议,全称:Protocol Buffer 它跟JSON,XML一样,是一个规定好的数据传播格式.不过,它的序列化和反序列化的效率太变态了…… 来看看几张图你就知道它有多变态.  pr ...

  5. twisted task.cpperator

    twisted task.cpperator 1.      twisted task.cpperator 1.1.    简介-cooperator 官方文档: https://twistedmat ...

  6. 关于ASA的TCP MSS

    About the TCP MSS The TCP maximum segment size (MSS) is the size of the TCP payload before any TCP a ...

  7. 配置和验证AP功率

    1.针对自主AP(Autonomous AP) 使用'power local'配置命令配置AP或Bridge Radio功率级别.在2.4 GHz,802.11g Radio上,您可以设置正交频分复用 ...

  8. leetcode 0214

    目录 ✅ 965. 单值二叉树 描述 解答 c++ updated dfs c++ py py 生成器 ✅ 762. 二进制表示中质数个计算置位 描述 解答 cpp other cpp mine ja ...

  9. jmeter download historyList

    https://archive.apache.org/dist/jmeter/binaries/ 反馈,问题和评论应发送到Apache JMeter Users 邮件列表. 有关更多信息, 请访问Ap ...

  10. 定时任务--mysql数据库备份

    vim /home/back.sh #!/bin/bash USER="******" PASSWORD="******" DATABASE="*** ...