GpsStatusListenerHelperpublic abstract class GpsStatusListenerHelper extends RemoteListenerHelper Implementation of a handler for {@link IGpsStatusListener}. |
Constructors Summary |
---|
public GpsStatusListenerHelper(android.os.Handler handler)
super(handler, "GpsStatusListenerHelper");
Operation nullOperation = new Operation() {
@Override
public void execute(IGpsStatusListener iGpsStatusListener) throws RemoteException {}
};
setSupported(GpsLocationProvider.isSupported(), nullOperation);
|
Methods Summary |
---|
protected ListenerOperation | getHandlerOperation(int result)
return null;
| protected void | handleGpsEnabledChanged(boolean enabled)
Operation operation;
if (enabled) {
operation = new Operation() {
@Override
public void execute(IGpsStatusListener listener) throws RemoteException {
listener.onGpsStarted();
}
};
} else {
operation = new Operation() {
@Override
public void execute(IGpsStatusListener listener) throws RemoteException {
listener.onGpsStopped();
}
};
}
foreach(operation);
| public void | onFirstFix(int timeToFirstFix)
Operation operation = new Operation() {
@Override
public void execute(IGpsStatusListener listener) throws RemoteException {
listener.onFirstFix(timeToFirstFix);
}
};
foreach(operation);
| public void | onNmeaReceived(long timestamp, java.lang.String nmea)
Operation operation = new Operation() {
@Override
public void execute(IGpsStatusListener listener) throws RemoteException {
listener.onNmeaReceived(timestamp, nmea);
}
};
foreach(operation);
| public void | onSvStatusChanged(int svCount, int[] prns, float[] snrs, float[] elevations, float[] azimuths, int ephemerisMask, int almanacMask, int usedInFixMask)
Operation operation = new Operation() {
@Override
public void execute(IGpsStatusListener listener) throws RemoteException {
listener.onSvStatusChanged(
svCount,
prns,
snrs,
elevations,
azimuths,
ephemerisMask,
almanacMask,
usedInFixMask);
}
};
foreach(operation);
| protected boolean | registerWithService()
return true;
| protected void | unregisterFromService()
|
|