How to get SIM number and IMEI number in Android?
How to get SIM number and IMEI number in Android? Step 1: First, in the manifest file have to add a permission which is "READ_PHONE_STATE". This will enable to get Telephony manager where we can find the mobile number and so on. <? xml version= "1.0" encoding= "utf-8" ?> < manifest xmlns: android = "http://schemas.android.com/apk/res/android" package= "com.bs23.aliahmed.simnumber" > < uses-permission android :name= "android.permission.READ_PHONE_STATE" /> < application android :allowBackup= "true" android :icon= "@mipmap/ic_launcher" android :label= "@string/app_name" android :roundIcon= "@mipmap/ic_launcher_round" android :supportsRtl= "true" android :theme= "@style/AppTheme" > < activity android :name= ".MainActivity" > < intent-