Methods Summary |
---|
public abstract void | fillInNotifierBundle(android.os.Bundle bundle)
|
public static android.telephony.CellLocation | getEmpty()Return a new CellLocation object representing an unknown
location, or null for unknown/none phone radio types.
// TelephonyManager.getDefault().getCurrentPhoneType() handles the case when
// ITelephony interface is not up yet.
switch(TelephonyManager.getDefault().getCurrentPhoneType()) {
case PhoneConstants.PHONE_TYPE_CDMA:
return new CdmaCellLocation();
case PhoneConstants.PHONE_TYPE_GSM:
return new GsmCellLocation();
default:
return null;
}
|
public abstract boolean | isEmpty()
|
public static android.telephony.CellLocation | newFromBundle(android.os.Bundle bundle)Create a new CellLocation from a intent notifier Bundle
This method is used by PhoneStateIntentReceiver and maybe by
external applications.
// TelephonyManager.getDefault().getCurrentPhoneType() handles the case when
// ITelephony interface is not up yet.
switch(TelephonyManager.getDefault().getCurrentPhoneType()) {
case PhoneConstants.PHONE_TYPE_CDMA:
return new CdmaCellLocation(bundle);
case PhoneConstants.PHONE_TYPE_GSM:
return new GsmCellLocation(bundle);
default:
return null;
}
|
public static void | requestLocationUpdate()Request an update of the current location. If the location has changed,
a broadcast will be sent to everyone registered with {@link
PhoneStateListener#LISTEN_CELL_LOCATION}.
try {
ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));
if (phone != null) {
phone.updateServiceLocation();
}
} catch (RemoteException ex) {
// ignore it
}
|