MapTrip SDK Android Manual 9.9.7
IwLocationManagerBase Class Referenceabstract
+ Inheritance diagram for IwLocationManagerBase:

Public Member Functions

void addListener (IwLocationListener l)
 
void addNmeaListener (NmeaListener nmeaListener)
 
void disableLocationUpdates ()
 
void doBestPossibleUpdate ()
 
boolean enableLocationUpdates ()
 
Location getCurrentLocation ()
 
Position getCurrentWGS84Position ()
 
String getLocationProvider ()
 
void onLocationChanged (@NonNull List< Location > locations)
 
void onProviderDisabled (String provider)
 
void onProviderEnabled (String provider)
 
void onStatusChanged (String provider, int status, Bundle extras)
 
void reInitLocationProvider ()
 
void removeListener (IwLocationListener l)
 
void setCurrentLocationNotFix ()
 
void uninit ()
 

Protected Member Functions

Location makeBadGpsIfEnabled (Location location)
 
void notifyGpsFix (boolean isGPSFix)
 
void notifyGpsStatusChanged (int status, Bundle bundle)
 
void notifyNewGpsLocation (Location location)
 
void passLocationToApi (final Location loc)
 
void setLastReceivedLocation (Location loc)
 

Static Protected Member Functions

static final long getFixTimeMS (Location location)
 

Detailed Description

Created by reckhaus on 22.03.2016.

Handles common behavior for all location providers - e.g. listener notification and location redirection to API

Member Function Documentation

◆ addListener()

void addListener ( IwLocationListener  listener)

add location listener

@paramn listener - listener to add

Implements IwLocationManager.

Reimplemented in IwLocationManagerGPS.

◆ addNmeaListener()

void addNmeaListener ( NmeaListener  nmeaListener)
inherited

add NMEAListener

Parameters
nmeaListener- listener to add

Implemented in IwLocationManagerGPS, and IwLocationManagerLog.

◆ disableLocationUpdates()

void disableLocationUpdates ( )
inherited

disable the location manager

Implemented in IwLocationManagerGPS, IwLocationManagerLog, and IwLocationManagerManual.

◆ doBestPossibleUpdate()

void doBestPossibleUpdate ( )
inherited

location manager tries to determine the best possible location and updates the API

Implemented in IwLocationManagerGPS, IwLocationManagerLog, and IwLocationManagerManual.

◆ enableLocationUpdates()

boolean enableLocationUpdates ( )
inherited

enable the location manager

Returns
true on success - false otherwise ( check permissions in that case)

Implemented in IwLocationManagerGPS, IwLocationManagerLog, and IwLocationManagerManual.

◆ getCurrentLocation()

Location getCurrentLocation ( )
Returns
the last received location

◆ getCurrentWGS84Position()

Position getCurrentWGS84Position ( )
Returns
the last received location as WGS84

Implements IwLocationManager.

◆ getFixTimeMS()

static final long getFixTimeMS ( Location  location)
staticprotected

◆ getLocationProvider()

String getLocationProvider ( )
inherited
Returns
String - provider for the locations - ( network, gps, log, manual... )

Implemented in IwLocationManagerGPS, IwLocationManagerLog, and IwLocationManagerManual.

◆ makeBadGpsIfEnabled()

Location makeBadGpsIfEnabled ( Location  location)
protected

Adds noise to a given location

Parameters
location- location to add noise to
Returns
location with added noise

◆ notifyGpsFix()

void notifyGpsFix ( boolean  isGPSFix)
protected

notify listeners about a gps fix

Parameters
isGPSFixif true, a fix is found if false it is lost

◆ notifyGpsStatusChanged()

void notifyGpsStatusChanged ( int  status,
Bundle  bundle 
)
protected

notify listener about status changed

◆ notifyNewGpsLocation()

void notifyNewGpsLocation ( Location  location)
protected

notify listeners about a new gps location

Parameters
location- the new received location

◆ onLocationChanged()

void onLocationChanged ( @NonNull List< Location >  locations)

◆ onProviderDisabled()

void onProviderDisabled ( String  provider)

◆ onProviderEnabled()

void onProviderEnabled ( String  provider)

◆ onStatusChanged()

void onStatusChanged ( String  provider,
int  status,
Bundle  extras 
)

◆ passLocationToApi()

void passLocationToApi ( final Location  loc)
protected

Passes the given location to the msm API in a queueApiCall

Parameters
locto pass

◆ reInitLocationProvider()

void reInitLocationProvider ( )
inherited

Search for best possible provider and calls disableLocationUpdates internal To get new location updates after this enableLocationUpdates must be called.

Implemented in IwLocationManagerGPS, IwLocationManagerLog, and IwLocationManagerManual.

◆ removeListener()

void removeListener ( IwLocationListener  listener)

remove location listener

Parameters
listener- listener to remove

Implements IwLocationManager.

◆ setCurrentLocationNotFix()

void setCurrentLocationNotFix ( )

pass the current location with bad to the api so that the position icon appears grey e.g. if there is no further GPS for a time or GPS gets deactivate this Method can be used to indicate

Implements IwLocationManager.

◆ setLastReceivedLocation()

void setLastReceivedLocation ( Location  loc)
protected

store last received location

Parameters
loc- location to set

◆ uninit()

void uninit ( )

clear listener


The documentation for this class was generated from the following file: