Loading...
Searching...
No Matches
com.navigine.idl.java.internal.LocationManagerBinding Class Reference
+ Inheritance diagram for com.navigine.idl.java.internal.LocationManagerBinding:

Public Member Functions

void addLocationListener (LocationListener listener)
 Method is used to add LocationListener element which will notify about newly downloaded and set location.
 
void removeLocationListener (LocationListener listener)
 Method is used for removing previously added LocationListener class element.
 
void setLocationId (int locationId)
 Method is used for setting current location, which will be downloaded from server or from storage, if it was downloaded before. Result will be handled by LocationListener.
 
int getLocationId ()
 Method returns current location unique identifier.
 
void commitChanges ()
 
void revertChanges ()
 
void setLocationUpdateInterval (int interval)
 Method is used to change interval in seconds check for new version from server Default: 300s.
 

Protected Member Functions

 LocationManagerBinding (NativeObject nativeObject)
 

Protected Attributes

Subscription< LocationListenerweakLocationListenerSubscription
 

Detailed Description

Definition at line 12 of file LocationManagerBinding.java.

Constructor & Destructor Documentation

◆ LocationManagerBinding()

com.navigine.idl.java.internal.LocationManagerBinding.LocationManagerBinding ( NativeObject nativeObject)
inlineprotected

Invoked only from native code.

Definition at line 19 of file LocationManagerBinding.java.

Member Function Documentation

◆ addLocationListener()

void com.navigine.idl.java.internal.LocationManagerBinding.addLocationListener ( LocationListener listener)
inline

Method is used to add LocationListener element which will notify about newly downloaded and set location.

Note
Do not forget to remove listener if it is no longer needed!
Parameters
listenerCorresponding LocationListener class.

Java code snippet:

// Add location listener
locationManager.addLocationListener(locationListener);

Kotlin code snippet:

// Add location listener
manager.addLocationListener(listener)

Reimplemented from com.navigine.idl.java.LocationManager.

Definition at line 35 of file LocationManagerBinding.java.

◆ commitChanges()

void com.navigine.idl.java.internal.LocationManagerBinding.commitChanges ( )
inline

Definition at line 63 of file LocationManagerBinding.java.

◆ getLocationId()

int com.navigine.idl.java.internal.LocationManagerBinding.getLocationId ( )
inline

Method returns current location unique identifier.

Returns
current location unique identifier

Java code snippet:

// Get current location ID
int currentLocationId = locationManager.getLocationId();
System.out.println("Current location ID: " + currentLocationId);

Kotlin code snippet:

// Get current location ID
val currentLocationId = manager.getLocationId()
println("Current location ID: $currentLocationId")

Reimplemented from com.navigine.idl.java.LocationManager.

Definition at line 56 of file LocationManagerBinding.java.

◆ removeLocationListener()

void com.navigine.idl.java.internal.LocationManagerBinding.removeLocationListener ( LocationListener listener)
inline

Method is used for removing previously added LocationListener class element.

Parameters
listenerCorresponding LocationListener class to remove.

Java code snippet:

// Remove location listener
locationManager.removeLocationListener(locationListener);

Kotlin code snippet:

// Remove location listener
manager.removeLocationListener(listener)

Reimplemented from com.navigine.idl.java.LocationManager.

Definition at line 42 of file LocationManagerBinding.java.

◆ revertChanges()

void com.navigine.idl.java.internal.LocationManagerBinding.revertChanges ( )
inline

Definition at line 70 of file LocationManagerBinding.java.

◆ setLocationId()

void com.navigine.idl.java.internal.LocationManagerBinding.setLocationId ( int locationId)
inline

Method is used for setting current location, which will be downloaded from server or from storage, if it was downloaded before. Result will be handled by LocationListener.

Parameters
locationIdlocation id from CMS

Java code snippet:

// Set location ID to load
locationManager.setLocationId(12345);

Kotlin code snippet:

// Set location ID to load
manager.setLocationId(12345)

Reimplemented from com.navigine.idl.java.LocationManager.

Definition at line 49 of file LocationManagerBinding.java.

◆ setLocationUpdateInterval()

void com.navigine.idl.java.internal.LocationManagerBinding.setLocationUpdateInterval ( int interval)
inline

Method is used to change interval in seconds check for new version from server Default: 300s.

Parameters
intervalupdate interval in seconds

Java code snippet:

// Set location update interval (in seconds)
locationManager.setLocationUpdateInterval(600); // 10 minutes

Kotlin code snippet:

// Set location update interval (in seconds)
manager.setLocationUpdateInterval(600) // 10 minutes

Reimplemented from com.navigine.idl.java.LocationManager.

Definition at line 77 of file LocationManagerBinding.java.

Member Data Documentation

◆ weakLocationListenerSubscription

Subscription<LocationListener> com.navigine.idl.java.internal.LocationManagerBinding.weakLocationListenerSubscription
protected
Initial value:
= new Subscription<LocationListener>() {
@Override
public NativeObject createNativeListener(LocationListener listener) {
return createLocationListener(listener);
}
}

Definition at line 24 of file LocationManagerBinding.java.


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