enableGeolocationBatteryOptimization

open fun enableGeolocationBatteryOptimization(@NonNull context: Context, enabled: Boolean)

By ignoring the geolocation battery optimization option, listening of motion sensor will be removed to keep listening for location services periodically. this option will significantly drain the battery

Parameters

context

the application context

enabled

true enabled false disabled