Packages dependencies If you intend to use this service you have to make sure that the
location
package have been properly downloaded. You can easily check if the package is available on the device with the following method:ISSite#hasPackage(EPackageType.LOCATION);
.
You can use our ISLocationProvider
to obtain location information. The ISLocationProvider
needs initialization information in order to communicate with our servers. You can easily link this library to the INSITEO map, so the location can be displayed on it.
To receive location, you will need to start the ISLocationProvider
, with a ISILocationProvider
:
Which flags to use By default we will use the location flags described in your
AndroidManifest.xml
. Please contact us to get the appropriate location settings and viewISLocationProvider
for flag details.
<application>
<meta-data android:name="com.insiteo.lbs.location.flags" android:value="NAVIGATION_FLAG_BLE"/>
</application>
// Start location
ISLocationProvider locProvider = ISLocationProvider.getInstance();
// Add location renderer to the ISMapView, thus location is displayed on map
mapView.addRenderer((LocationRenderer) LocationProvider.getInstance().getRenderer(getResources()));
locProvider.start(listener);
Prerequisites
- The API needs to be initialized.
- You can now be notified when no registered beacons were detected, which probably means that the user started the location whereas he is not on site.
Available location-based services are:
ISELocationModule.ITINERARY
: this module computes the route between an arrival point, and a departure point (could be the user current location).ISELocationModule.GEOGENCING
: this module detects when user location is in "active" areas, and notify the application that the user entered/stayed in/left these areas.
To use them, you have to request them from ISLocationProvider
with the ISELocationModule
method. Be aware that a new module is created for each call of LocationProvider#getModule()
.