android - 直接打开标准拨号器,无需使用意图选择器
问题描述
是否可以直接打开android拨号器。标准解决方案(通过 Intent.ACTION_DIAL)不适合我,因为它创建了意图选择器,并且还有其他拨号器应用程序,例如 viber。有什么解决办法吗?
解决方案
Unfortunately there is no way to directly open the dialer because you cant tell all the dialers package names on all the vendors, for instance a Xiaomi dialer would have a different package name than the LG one.
The only way is to use Intents to ask the OS to open the dialer, if there is a default dialer selected it will open the default one, if default is not selected the user will be asked to choose.
This is the correct and expected behavior and is made so for a reason.
推荐阅读
- c# - 使用 Entity Framework Core 时我应该处置 DbContext
- c# - 查询日期之间每种类型的一条记录
- java - 如何在 Spring MVC 控制器中接收 multipart/form-data?
- javascript - Vuetify 密码确认不起作用
- c# - 无法反序列化当前的 JSON 数组(例如 [1,2,3])& {“解析值时遇到意外字符:e. Path '', line 0, position 0.”}
- tensorflow - torch.nn.LSTM 是否等于 tf.nn.rnn_cell.BasicLSTMCell?
- gradle - Gradle 应用程序构建不包含自己的 jar
- directadmin - 禁用一个域的直接管理员访问权限,设置另一个位置进行管理
- javascript - 输入范围滑块值应指向页面加载时 cgi 脚本值的输出
- google-chrome - 摘要式身份验证请求中的 HTTP 无授权字段