Android Check If Sim is Locked
<p>I have this running at the moment. It keeps outputting the value 5 which means SIM_READY</p>

<pre><code>TelephonyManager telMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
int sim = telMgr.getSimState();
String sim2 =  Integer.toString(sim);
Log.d("SIM STATE", sim2); 
</code></pre>

<p>I have run this on a few phones some that I know are locked and some that are not.</p>

<p>Is there something that I am missing as I thought this approach would output if the sim was locked by the network.</p>

<p>Cheers</p>
