Update Current Location
Using the updateCurrentLocation method, you can update the users' current location. You can set the accuracy between 5 to 100 meters (default is 10).
You can now send custom meta-data json values along with updateCurrentLocation method.
Kotlin
Java
1
val data = JSONObject()
2
data.put("Key", "Value")
3
val roamPublish = RoamPublish.Builder()
4
.metadata(data)
5
.build()
6
Roam.updateCurrentLocation(DesiredAccuracy, accuracy,roamPublish)
Copied!
1
JSONObject data = new JSONObject();
2
data.put("Key", "Value");
3
RoamPublish roamPublish = new RoamPublish.Builder()
4
.metadata(data)
5
.build();
6
Roam.updateCurrentLocation(DesiredAccuracy, accuracy,roamPublish);
Copied!
This method should be used only if you need to update the current location of the device with better accuracy. Using this method consistently will consume more battery. The higher the accuracy, the longer the response time. In some cases, it can take up to 30 seconds depending on the GPS signal strength.
Export as PDF
Copy link