in which cases this method returns a null reference? Can only depend on the sim card? Doesn't exist, in these cases, an alternative to retrieve an identification number of the latter?
Thanks to all!
Please make sure whether you have added the following permission in the Android Manifest, if not please add this statement add try again.
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
Note: Add this permission tag outside the application tag..
Sample Snippet:
.....
.....
.....
</application>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android......"/>
..........
</manifest>
All the Best