In order to show the user's current location, we will need to add a Location Provider to provide updated location information.
Here's a brief summary of the location providers Phunware provides:
|Senion Lab BLE location provider|
|Cisco MSE location provider|
|GPS location provider|
Below are the steps for integrating a BLE Location Provider with your app.
Step 1 - Add a location provider as a compile dependency.
Step 2 - Set the Location Provider on the PhunwareMapManager
This step tells the PhunwareMapManager what provider will be used to get location updates. In this case, the Senion Location Provider requires a customer id and map id.
Step 3 - Enable Location Updates
Once the PhunwareMap and the Building are loaded, we'll enable location updates.
Step 4 - Manage Location Updates when in the Background
Constant location updates when in the background will drain a battery. In order to prevent this, we intercept activity lifecycle methods to disable and enable location updates.