htc android 2.2 obtaining cellID wcdma
<p>its my first 'helloWorld' type app on android, and also in java so please be patient :)</p>

<p>I want to obtain cell ID in W-CDMA, so i make that app:</p>

<pre><code>    package helloWorld.w;

//package com.eepyaj.cellID;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.telephony.cdma.CdmaCellLocation;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class w extends Activity {

   CdmaCellLocation location;
   int cellID, lac;
   private Context context;

   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      context = (Context) this;
      TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
      location = (CdmaCellLocation) tm.getCellLocation();
      cellID = location.getBaseStationId();

      String tx;
      tx = String.valueOf(cellID);
      TextView tv = new TextView(this);
      tv.setText("Cell ID " + tx);
      setContentView(tv);

   }
}
</code></pre>

<p>Unfortunately application exits with message:</p>

<p>"Application helloWorld (process helloWorld.w) has stopped unexpectedly. Please try again" (both on HTC and on emulator)</p>

<p>I made that app under eclpise, typcial 'hello World' works (on htc and on emulator), so i think that problem is in obtaining that 'cellID'</p>

<p>thx in advance for any help</p>
