开发者

Android check sms

How can I check if the devic开发者_StackOverflowe has SMS capabilities (e.g phones probably will but tablets might not)?


I answered the question myself, I'm using;

if(this.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)){
  // THIS PHONE HAS SMS FUNCTIONALITY
}else{
  // NO SMS HERE :(
}


You could check for SmsManager being there or not. I guess unconnected tablets wont have it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜