简体   繁体   English

没有提示的拨号号码

[英]Dial number without prompt

I'm trying to write a function for the Android platform that will allow me to call 911 without any sort of prompt. 我正在尝试为Android平台编写一个函数,该函数将允许我在没有任何提示的情况下拨打911。

I have already added the permission android.permission.CALL_PRIVILEGED . 我已经添加了权限android.permission.CALL_PRIVILEGED I just need a function that will dial 911 at the press of a button in my options menu. 我只需要一个在我的选项菜单中按一下按钮即可拨打911的功能。

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. 根据API, ACTION_CALL会执行您需要的操作,但不会处理紧急号码,而ACTION_DIAL将显示带有拨号提示的拨号程序,但允许拨打紧急号码。

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. 这是一种预防措施。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM