Skip to content Skip to sidebar Skip to footer

How To Find Out Whether A Particular Device Has SIM Hardware Support?

I wanted to disable features related to CALL and SMS in my application based on whether SIM hardware is present or not. Now a beginners approach towards this will be checking the P

Solution 1:

Use

PackageManager pm = this.getPackageManager();
boolean hasTelephony=pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

Edit:

Try using

TelephonyManager.getLine1Number()

If this returns null then you wont have telephony feature. Have not tried. give it a shot


Post a Comment for "How To Find Out Whether A Particular Device Has SIM Hardware Support?"