title: Android API CellInfo & CellInfoGsm
body: <p><a href="http://developer.android.com/reference/android/telephony/CellInfoGsm.html" rel="nofollow">Link</a></p>
  
  <p>I would like to get CellInfoGsm data, but I got some error.</p>
  
  <p>CellInfoGsm is subclass of CellInfo. I don't know how to get the CellInfoGsm data.</p>
  
  <p>Could someone help me to write the right code?</p>
  
  <pre><code>TelephonyManager TM = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
  
  (CellInfoGsm) cellinfogsm = (CellInfoGsm)TM.getAllCellInfo();
  </code></pre>