The home operator is the operator you pay your bill to and get
customer service from. The cell site you are currently talking to may
not be owned by the same operator. When this happens, you are
(sometimes?) considered to be "roaming". As far as I know, all the
functions you mentioned give information about the current cell site,
not the home operator. So for example, if I had a contract with AT&T
and I was in Seattle, both the current cell site and the home operator
are the same, but if I traveled to Vancouver, Canada the cell site
would be owned by Rogers and those functions would return the MCC and
MNC of Rogers, not AT&T. The GSM API on Android, Windows Mobile, and
Blackberry allow you to differentiate between the home and current
operator, but with CDMA it gets tricky. Blackberry makes it easy by
providing a function that returns the home SID, but neither Windows
Mobile nor Android provide a similar function.

I have not tested getNetworkOperatorName() in a roaming situation, but
my assumption is that it returns the carrier that owns the current
cell site. I think this because the documentation says "... of current
registered operator." I understand "registration" to be the process
the phone goes through when handshaking with a cell site.

Here are the interesting GSM functions in Android:

TelephonyManager.getSimOperator()
    Returns the home operator (MCC + MNC). It just returns the first
part of the IMSI stored on the SIM.

ServiceState.getOperatorNumeric()
    Returns the current operator (MCC + MNC). This is retrieved from
the current cell site.

GsmCellLocation.getLac()
    Returns the Location Area Code of the current cell site.

GsmCellLocation.getCid()
    Returns the Cell ID of the current cell site.

Some of these have CDMA equivalents:

TelephonyManager.getSimOperator()
    In non "world phones", this returns the first 6 digits of the IMSI
(e.g. 3100004). This is bogus, because CDMA IMSI's have 00 for the MNC
which 2 digits not 3 and useless either way. The 4 on the end is
actually the beginning of the subscriber ID. This is a bug in Android
as far as I can tell. In world phones, it will probably return the MCC
+MNC for an operator in Europe.

ServiceState.getOperatorNumeric()
    Returns the MCC + 00. This is mostly useless, because it does not
identify the carrier.

CdmaCellLocation.getSystemId()
    Returns the System ID of the current cell cite (this identifies
the operator that owns the cell site). It is analogous to MNC.

CdmaCellLocation.getNetworkId()
    Returns the Network ID of the current cell site. It is analogous
to LAC.

CdmaCellLocation.getBaseStationId()
    Returns the Base Station ID of the current cell site, It is
analogous to CID.

What is missing is a CDMA equivalent of TelephonyManager.getSimOperator
() that returns the home SID.

On Dec 2, 7:18 pm, Ken H <hunt1...@gmail.com> wrote:
> 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