拨打电话
来源:互联网 发布:指尖陀螺推荐 知乎 编辑:程序博客网 时间:2024/04/30 10:21
1.直接拨打
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "phone")); startActivity(intent);
2.跳转到拨号界面
Intent intent = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:" + "需要拨打的phone")); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);
注意:
拨打的电话只能全是数字,去除-
如:
String phone="028-78451235"; phone=phone.replace("-", ""); Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone)); startActivity(intent);
0 0
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- j2me拨打电话
- j2me拨打电话
- 拨打电话的礼仪
- Window Mobile拨打电话
- 简单拨打电话程序!!!
- C# 读取Excel到DataTable中
- 输出给定字符串的组合情况
- JAVA基础应用——POI操作Excel
- Android 文本滚动效果的几种实现方式(二)
- Android 集成微信支付V3
- 拨打电话
- nginx root、alias、location指令使用方法
- LeetCode 11_Container With Most Water
- Missing contentDescription attribute on image
- swift 的网络请求--Alamofire框架
- Struts2的结果集的详细介绍及说明案例分析
- 内网机器,共享IP的方法
- 从傅里叶级数到傅里叶变换
- android自动测试之--monkeyrunner工具(二)