我如何检查是否平板支持SIM卡或不? [英] How can I check that whether tablet supports sim card or not.?

查看:720
本文介绍了我如何检查是否平板支持SIM卡或不?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造它的呼叫记录,短信,日历等数据同步到网络服务器应用程序。 但是,一些平板电脑一直不支持SIM卡,所以我无法找到从平板呼叫记录和短信。

所以,我希望从平板电脑有没有SIM卡禁用的设备。 所以,我怎么能找到所选择的平板电脑拥有SIM卡或不..

解决方案

  TelephonyManager telephonyManager1 =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
           如果(telephonyManager1.getPhoneType()== TelephonyManager.PHONE_TYPE_NONE)
{
  //来到这里,如果平板电脑
}
其他{
  //来到这里,如果手机
}
 

I am creating an application which sync the data of call-Logs,SMS,Calendars etc. to the webserver. But some of tablet has not support the Sim card so I could not find call-Logs and SMS from that tablet.

So I want to disable the facility from that tablet which has not Sim card. So how can I find that the Selected Tablet has Sim card or not..

解决方案

TelephonyManager telephonyManager1 = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
           if(telephonyManager1.getPhoneType()==TelephonyManager.PHONE_TYPE_NONE)
{
  //coming here if Tablet 
}
else{
  //coming here if phone
}

这篇关于我如何检查是否平板支持SIM卡或不?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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