Update Current Location (Android)

Call this method to update the current location of a user.

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.

val data = JSONObject() 
data.put("Key", "Value") 
val roamPublish = RoamPublish.Builder() 
                    .metadata(data) 
                    .build() 
Roam.updateCurrentLocation(DesiredAccuracy, accuracy,roamPublish)

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.

Last updated