如何检测如果设备能够通话和短信的 [英] How to detect if device is capable of calling and messaging

查看:134
本文介绍了如何检测如果设备能够通话和短信的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有些设备IE浏览器。银河平板电脑10.1只能发送短信,但不能打电话。其他一些设备,如华硕变压器甚至没有SIM卡。

Some devices ie. Galaxy Tablet 10.1 can only send SMS, but cannot call. Some other devices like Asus Transformer don't even have SIM card.

我如何检测设备可以使电话?我怎么可以检测设备可以发送短信?

How can I detect if device can makes calls? And how can I detect if device can send SMS?

推荐答案

也许你可以的查询PackageManager 系统是否包含能够响应ACTION_CALL和ACTION_SENDTO意图的任何组成部分?您可能需要添加电话:和smsto:计划中的URI

Maybe you can query the PackageManager whether the system contains any component that can respond to ACTION_CALL and ACTION_SENDTO intents? You might need to add the "tel:" and "smsto:" scheme in the URI.

这篇关于如何检测如果设备能够通话和短信的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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