Adjust geolocation settings
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.0-beta-20180122-1533" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.2.0-beta-20180122-1635" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
src/android/plugin/google/maps/PluginGeolocation.java
src/android/plugin/google/maps/PluginGeolocation.java
@@ -307,13 +307,11 @@ public class PluginGeolocation extends CordovaPlugin {
}
LocationRequest locationRequest= LocationRequest.create()
- //.setExpirationTime(5000)
- .setFastestInterval(1000)
.setNumUpdates(2)
.setSmallestDisplacement(0)
.setPriority(priority)
- .setMaxWaitTime(6000)
- .setInterval(3000);
+ .setExpirationDuration(12000)
+ .setMaxWaitTime(6000);
LocationServices.getFusedLocationProviderClient(cordova.getActivity())

Adjust geolocation settings