安卓 拨号界面和直接拨打界面

/**
	 *打电话
	 * 
	 * @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);
	}
 

猜你喜欢

转载自zhegui.iteye.com/blog/1680373