没有提示的拨打号码 [英] Dial number without prompt

查看:21
本文介绍了没有提示的拨打号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 Android 平台编写一个函数,它允许我在没有任何提示的情况下拨打 911.

I'm trying to write a function for the Android platform that will allow me to call 911 without any sort of prompt.

我已经添加了权限android.permission.CALL_PRIVILEGED.我只需要一个功能,可以在我的选项菜单中按下按钮拨打 911.

I have already added the permission android.permission.CALL_PRIVILEGED. I just need a function that will dial 911 at the press of a button in my options menu.

推荐答案

根据 API,ACTION_CALL 会做你需要做的事,但不是紧急号码,而 ACTION_DIAL 将显示带有拨号提示的拨号器,但允许拨打紧急号码.

According to the API, ACTION_CALL will do what you need but not to emergency numbers, while ACTION_DIAL will display a dialer with the dial prompt but allows to call emergency numbers.

恐怕没有办法做您想做的事,这是有充分理由的 - 以防止误拨紧急服务.这是一种预防措施.

I'm afraid there is no way to do what you want, for a good reason - to prevent misdials to emergency services. It's a precautionary measure.

这篇关于没有提示的拨打号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆