disableBatteryOptimization()
method of the Sentiance
class. This will trigger a system dialog asking the user to allow disabling battery optimization for your app.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
permission required for this feature. You must therefore explicitly add this permission to your app.