安卓拨打电话

来源:互联网 发布:北京数据分析师培训 编辑:程序博客网 时间:2024/04/28 09:29
/** * 拨打电话 */private void CellPhone(TextView tv) {final String phone = tv.getText().toString();if (phone != null && !"".equals(phone)) {boolean isphone = VerifyUtils.isPhone(phone);if (isphone) {AlertUtil.AlertDialog(OrderDetailsActivity.this, "提示", "确定要拨打电话" + phone + "?",new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));startActivity(intent);}});}}}


别忘了加权限



0 0
原创粉丝点击