Android API List<cellinfo>
<p>I would like to get the CellInfo data, but the cellinfo.size() always occur
 the NullPointerException in Emulator. </p>

<p><a href="http://developer.android.com/reference/android/telephony/CellInfo.html" rel="nofollow">CellInfo Link </a></p>

<p>I am not sure the exception situation, anyone know the reason?</p>

<p>Whether I wrote the wrong code? or anyone met the same exception?</p>

<pre><code>    TelephonyManager TM = (TelephonyManager) this
            .getSystemService(Context.TELEPHONY_SERVICE);
    List&lt;CellInfo&gt; cellinfo = TM.getAllCellInfo();
    Log.d("AA",Integer.toString(cellinfo.size()));
</code></pre>
