This is the code from an answer I\'ve found on another thread:
TelephonyManager mManager = (TelephonyManager)ctx.getSystemService(Context.TELEPHONY_SERVICE); if (