I think I'm getting confused by what you mean by "home operator" and
"current cell tower".

The getNetworkOperatorName() method will get you the network or
"carrier" your phone is on (T-Mobile for example). I assume that is
what you mean by "home operator".

Technically there is nothing that tells you the "cell tower". Mobiles
don't talk to towers, they talk to cells, or sectors, on the tower.
Most towers -- or cell sites, since they can be located anywhere, not
just on poles -- have 3 sectors. Depending or your location relative
to that site your mobile may be talking to sector A, B or C. In GSM
the cells are uniquely identified by the CGI which consist of the
mobile country code (MCC), mobile network code (MNC), location area
code (LAC), and Cell ID. You can get MCC & MNC by using
getNetworkOperator(), and you can get the LAC & CI by using

GsmCellLocation cl = (GsmCellLocation) tm.getCellLocation();
int CELLID = cl.getCid();
int LAC = cl.getLac();

But again, this is GSM. The method I mentioned in my first post
*should* get you the CDMA version of the System ID, Network ID, and
Base Station ID, which will uniquely identify the cell you are current
on.

Ken


On Dec 2, 4:22 pm, gudujarlson <gudujarl...@gmail.com> wrote:
> What you are referring to is information about the current cell tower,
> not the home operator. On a GSM phone, you can get the home operator
> with TelephonyManager.getSimOperator(), but on a CDMA phone it returns
> a bogus value.
>
> On Dec 2, 6:14 pm, Ken H <hunt1...@gmail.com> wrote:
>
>
>
> > On GSM I use:
>
> > TelephonyManager tm  = (TelephonyManager) getSystemService
> > (Context.TELEPHONY_SERVICE);
> > String Operator = tm.getNetworkOperatorName();
>
> > I assume CDMA is the same since I've seen nothing in the docs that say
> > otherwise. Also, for CDMA you can get SystemID & etc., by using:
>
> > CdmaCellLocation cd = (CdmaCellLocation) tm.getCellLocation();
> > int sysid = cd.getSystemId();
> > int netid = cd.getNetworkId();
> > int bsid = cd.getBaseStationId();
>
> > I can't test this last part out since I have a GSM phone. You can also
> > look at:
>
> >http://developer.android.com/intl/fr/reference/android/telephony/cdma...
>
> > Ken

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to