remoteObject.setHandler( createGeolocationHandler() );
remoteObject.set( PROP_NEEDS_POSITION, NeedsPositionFlavor.NEVER.toString() );
}
private OperationHandler createGeolocationHandler() {
return new AbstractOperationHandler() {
@Override
public void handleNotify( String event, Map<String,Object> properties ) {
checkCallback();
if( LOCATION_UPDATE_EVENT.equals( event ) ) {
callback.onSuccess( getPosition( properties ) );