---
title: "安卓 拨号界面和直接拨打界面"
author: "xinanadu"
date: "2012-09-18T10:59:11Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2012-09-18T10:59:11Z"
id: 1680373
url: "https://zhegui.iteye.com/blog/1680373"
---

```
/**
	 *打电话
	 * 
	 * @param tel
	 *            电话号码
	 */
	protected void call(String tel) {
		// 只进入拨号界面，不拨打
		 Uri uri = Uri.parse("tel:" + string);
		 Intent intent = new Intent(Intent.ACTION_DIAL, uri);
		 startActivity(intent);

		 //直接拨打
		Log.d(TAG, "call:" + tel);
		Uri uri = Uri.parse("tel:" + tel);
		Intent intent = new Intent(Intent.ACTION_CALL, uri);
		startActivity(intent);
	}
```