public static void callPhone(Context context, String tel) throws Exception { if (stringIsNull(tel)) { return; } tel = tel.replace("转", ",,"); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.fromParts("tel", tel, null));//拼一个电话的Uri,拨打分机号 关键代码 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } 例如 400090999转8
80,337
社区成员
91,284
社区内容
加载中
试试用AI创作助手写篇文章吧