public class GeoLocationBeaconAndroid extends GeoLocationBeacon implements IBlaubotAndroidComponent
Constructor and Description |
---|
GeoLocationBeaconAndroid(IBlaubotBeaconStore beaconStore,
IBlaubotConnector... connectors) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isBetterLocation(Location location,
Location currentBestLocation)
Determines whether one Location reading is better than the current Location fix
|
void |
onLocationChanged(Location location) |
void |
onNewIntent(Intent intent)
Gets called when a new intent was received on the foreground activity
|
void |
onPause(Activity context)
Gets called when onPause was called on the foreground activity
|
void |
onProviderDisabled(java.lang.String provider) |
void |
onProviderEnabled(java.lang.String provider) |
void |
onResume(Activity context)
Gets called when onResume was called on the foreground activity
|
void |
onStatusChanged(java.lang.String provider,
int status,
Bundle extras) |
void |
setCurrentContext(Context context)
Gets called if the android context changes (onResume).
|
getAdapter, getConnectionMetaData, isStarted, onConnectionStateMachineStateChanged, setAcceptorListener, setBeaconStore, setBlaubot, setDiscoveryActivated, setDiscoveryEventListener, setGeoData, setListeningStateListener, startListening, stopListening
public GeoLocationBeaconAndroid(IBlaubotBeaconStore beaconStore, IBlaubotConnector... connectors)
beaconStore
- The beacon store holding the connection meta data for the given connectors to connect to the GeoBeaconServer's acceptors.connectors
- connectors to be used to establish a connection to the beacon serverpublic void onLocationChanged(Location location)
public void onStatusChanged(java.lang.String provider, int status, Bundle extras)
public void onProviderEnabled(java.lang.String provider)
public void onProviderDisabled(java.lang.String provider)
public void setCurrentContext(Context context)
IBlaubotAndroidComponent
setCurrentContext
in interface IBlaubotAndroidComponent
context
- the contextpublic void onResume(Activity context)
IBlaubotAndroidComponent
onResume
in interface IBlaubotAndroidComponent
context
- the foregroudn activitypublic void onPause(Activity context)
IBlaubotAndroidComponent
onPause
in interface IBlaubotAndroidComponent
context
- the current android contextpublic void onNewIntent(Intent intent)
IBlaubotAndroidComponent
onNewIntent
in interface IBlaubotAndroidComponent
intent
- the new intentprotected boolean isBetterLocation(Location location, Location currentBestLocation)
location
- The new Location that you want to evaluatecurrentBestLocation
- The current Location fix, to which you want to compare the new one