Questions tagged [battery-saver]
The battery-saver tag has no usage guidance.
82
questions
0
votes
0
answers
53
views
Android Battery Optimization Issue in Motorola Devices
I am facing an issue with Motorola devices. I am using the below code to know if the user has ignored the battery optimization or not.
Code for checking optimization is on or off:
private fun ...
0
votes
2
answers
107
views
Is there any way to control charging in android programatically without using any third party Apps?
We have an Android Application which has to be installed at Client Location in Tab and the tab has to be charged and running continuosly without getting tab turn off which leads to battery health drop....
0
votes
0
answers
25
views
How can I get some energy consumption values for applications by custom Android app?
Every Android firmware shell like Xiaomi MIUI has energy consumption monitor, which can bind energy consumption to process or package.
How can I get these data by custom Android application? Is any ...
1
vote
1
answer
961
views
Android - Disable Forced DozeMode or AppStandByMode
I have an application that uses a ForegroundService to send location updates to a server. Basically a tracker.
This ForegroundService has a Handler that periodically (using postDelayed) executes a ...
0
votes
1
answer
132
views
How can I keep app running through Ultra Battery Saver mode / Adb shell uninstall Ultra Battery Saver ? (No root)
I am trying to disable the option to start ultra battery saver mode on Miui 11 without root acces. Is it possible to do this? I have tried to uninstall com.miui.securitycenter which helps up untill ...
1
vote
0
answers
144
views
Android Studio Alammanager in battery saver mode
I need some help.
Alarmmanager only works for me if I turn off battery optimalization (saving) mode for the app. (with this permission: "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&...
1
vote
1
answer
316
views
Background service stops in battery saver mode in android R
I wrote an android app that checks battery level by changing level and gives an alarm when the level reaches a certain value.
I made use of broadcast receiver and background service in my app.
It ...
5
votes
1
answer
3k
views
Foreground service is killed in Android 10
In Android 10, some manufacturer comes with the new feature in a battery optimization setting (see the picture). My foreground service getting killed by OS after some time when the screen is off.
I ...
0
votes
1
answer
542
views
Android sensors don't gather data when phone is idle
I’m trying to develop an app for Android in which I pick up data from several sensors (if available on the device) and write it down to a file which will later be analyzed for certain uses.
I’m facing ...
0
votes
1
answer
674
views
Battery saver feature prevents WorkManager to be executed
Devices such as Huawei, Xiaomi, some Samsung models, or most of the devices I know that has MIUI, EMUI in their system has by default turned on battery saver features and automatic "optimizations". ...
1
vote
0
answers
19
views
Is there a way to see what time the phone was last placed in battery saver mode?
In my situation, I am using the Strava app on a Pixel 2 and noticed that my phone was in battery saver mode at the end of the run. I chalked that up as the reason why my usual running route was 0.2 ...
4
votes
0
answers
355
views
Unable to load Images for the Firebase Notification(Data Messages) in background during Battery-Saver Mode Android
I am using FCM Data Messages for pushing Notifications to my Android App. So basically, my data payload will have the information like Notification Title, Message and Image URL. The Image URL will be ...
9
votes
1
answer
2k
views
Retrieve state of Windows 10 Power mode slider
Is there any API to retrieve a state of Windows 10 Power mode slider?
I was looking at Windows.System.Power namespace. But PowerManager class seem to provide only an immediate state of the power ...
3
votes
1
answer
3k
views
ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS : Need Intent to All Apps List
I need an intent to "Don't optimize" settings page of ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS .
But when i change it to "Don't optimize and return , The settings are not saved .
It will be still ...
1
vote
1
answer
1k
views
Battery saver (and Night mode) on Android 9 Pie relaunches whole activity, how to prevent this?
When I run my app on device (Google Pixel 2) with Android 9 Pie and switch on (or switch off) battery saver, whole activity immediately relaunches.
When I switch on battery saver on lower versions of ...
2
votes
1
answer
370
views
Android Service Running only when UI is active
It seems Android in recent version have introduced multiple restrictions on running services in the Background, which of course it good news for battery life of our devices. My goal is to create an ...
2
votes
0
answers
62
views
How To Show The Application Running In The Background And How We Can Stop Their Operation?
I want to make a battery saver application on which i want to show all the applications running in the background into recyclerview and after showing them then i want to kill all the applications that ...
0
votes
1
answer
87
views
Link in video not clickable on mobile (iOS) in power saving mode
I have an autoplay video on my site which also serves as a link to another page. But now I found a problem in the power saving mode of the iPhone. Clicking on the video plays the video. But when I ...
0
votes
1
answer
503
views
Bluetooth service optimized, Android
I have an app that uses BLE to exchange data with a BLE-capable device.
I used to develop and test it using Asus Zenfone Max 3 (Android 8.1) and I had no problems.
Then, I got an Asus Zenfone Max Pro ...
3
votes
1
answer
2k
views
How force the app to opt out of battery saver mode when the service is ON?
The expected behavior is that the app will be running all the time when it's in ON state. Some phones put the app in background mode when the app is not active for some time. I want the app to be ...
1
vote
1
answer
757
views
Control low battery mode from an iOS application
I would like switch on/off low power mode in an application. Is it possible to control battery mode from an iOS application.
6
votes
0
answers
459
views
Read the `Power Saving Modes` settings on the MIUI devices
The Power Saving Modes settings is different from the regular Android OS Power Saver setting and accessible on MIUI devices only (or rather accessible at least on MIUI devices)
Settings -> Battery &...
11
votes
1
answer
378
views
How to keep playback active after the screen is turned off
I have an app with audio playback, but on some devices (mainly Huawei, Samsung, Sony) playback is stopped when the screen goes off.
Note: playback does not stop for some other apps like Spotify, Play ...
1
vote
1
answer
115
views
App freezes for a second on REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
I'm working on an app that requires active working service so to avoid Doze Mode I've write code that'll show a default dialog to ask that this app will consume more battery and all. But the main ...
-3
votes
1
answer
333
views
How to reduce the battery power consumption?
In my application I'm using Google Maps and getting latlon from onLocationChanged(), while it's running in background and also getting that value using services.
Due to this, a lot of battery power ...
1
vote
1
answer
409
views
adding an app to battery saver programmatically when the app is installed
i developed an Android application, it contains so much background services and it uses Medias unfortunately this app is draining the battery life fast
i search the web but i didn't reach a good ...
0
votes
1
answer
46
views
C client-server application and battery saving on linux
Could someone explain me please, how i can achieve the most efficient battery saving: I want to code a simple client-server app. Server sending periodic messages to client (let's say 'hello'), and ...
1
vote
2
answers
777
views
Android app appears in Battery Optimizations whitelist, but is not actually there
Background:
I am developing an Android app. When the app starts up, it checks to see if it is excluded from Battery Optimizations using the isIgnoringBatteryOptimizations() function. If that function ...
1
vote
0
answers
401
views
how to enable power saver mode in android samsung mobile
Kindly give some example or idea for enabling the power saver mode from android code for samsung devices as well as moto devices programmatically.Or else kindly give some example for navigating the ...
-1
votes
1
answer
850
views
How to reduce battery usage of app?
I am developing an app which tracks the user location for every 10-20 secs. In order to make it work in the background and mobile locked stage, I had to make the following code edits:
In Android:
I ...
28
votes
2
answers
3k
views
Battery-saver + phone-call-intent => no Internet?
Note: as it turns out, the original question was incorrect in its assumptions. See more details on its edits at the bottom.
It's now about the battery-saver, and not battery-saver&doze-mode. It's ...
0
votes
1
answer
82
views
Android battery consumption issue
I have developed one android app which working well with all devices but with Galaxy S8 only consumed more battery compare to other devices.
How to can handle battery consumption for S8 ?
There are ...
1
vote
0
answers
682
views
Battery optimization whitelist doesn't work
I have an IntentService in my app that do some work in foreground mode. The code like this:
protected void onHandleIntent(@Nullable Intent intent) {
while (i < 100){
task();
i++;
...
4
votes
1
answer
1k
views
How to play animations in battery saver mode in android ? Is there any work around?
I am using animation library in my app(For scanning).Whenever device goes to batter saver mode animations are being disabled.In some other apps animations are not disabled. Is there any work around to ...
0
votes
0
answers
31
views
Oportunistic packet send on Android
Say I have an app that needs to send some small packets from time to time to a server, no particular interval (well maybe a maximum interval). Since one doesn't want to wake the CPU+radio+other SoC ...
3
votes
1
answer
935
views
GCM Notification when battery saver is turned on
I have one doubt regarding battery saver. How GCM Notification behaves when battery saver is turned on? Whether GCM Notification with normal priority will be delivered to the app?
1
vote
1
answer
249
views
Detect DRX mode (android)
I wanted to check if my android device is going into DRX mode.
[1] I was looking for an existing app that could tell, but I haven't found one..
[2] Is there a software to connect directly to the ...
0
votes
0
answers
80
views
Using Power Profile can i calculate battery remaining time and discharge time in android [duplicate]
I am new in android and i make battery optimize application.
I want to calculate battery remaining time and discharge time.
And i also want to calculate Wifi, 3G Call, Movie, Music and Bluetooth ...
2
votes
1
answer
84
views
Is there a battery saving methode when reading GPS sensor in time intervals?
I'm developing an android app which collect GPS sensor data in time intervals programatically (one per 5min). So it drains the battery badly. Is there any way to optimize the power consumption?
Is ...
0
votes
1
answer
103
views
SD Card Shared SPI High Current Consumption
Hi I am using shared SPI Lines between External Flash and SD Card. For SD Card i use MSP430's SPI Engine, however for External Flash I am using same SPI Lines but as GPIO BitBanging.
The SD Card is a ...
0
votes
0
answers
85
views
Battery usage by running application in android os
How to get battery usage by running application.its start with when my mobile battery is full to till.my application required list with each battery usage in percentage.
I already try this
...
5
votes
1
answer
1k
views
Object Animator not working in Battery Saver mode post JellyBean(>Android 5.x)
My application heavily uses ObjectAnimator. But I have recently noticed that animations using ObjectAnimator do not work or sometimes even crash when the battery saver mode is turned on. Since the ...
0
votes
1
answer
123
views
iOS: How to use location tracking during predefined time period while saving battery life?
iOS: How to use location tracking during predefined time period while saving battery life?
I need to activate location tracking during predefined time periods (does not matter if app in background or ...
1
vote
1
answer
571
views
PoweSavingMode Vs App optimization
I need to know if there is any battery saving policy with the whole system or specific to my app.
I found out that you can check if the Power Saving Mode is activated or not by calling:
PowerManager ...
0
votes
1
answer
2k
views
FragmentTransaction.setCustomAnimations() doesn't work when battery saver is on
I'm using custom animation (sliding from left to right) on transition between fragments. But when battery saver is on after calling FragmentTransaction.commit() second fragment is not showing.
...
4
votes
2
answers
968
views
Progressbar disappears in battery saver mode (Android 5.x)?
I noticed that when the Battery saver mode is enabled (by the user or automatically) in Android 5.x - ProgressBars in application just disappear.
No animation, no static progressbar widget - just ...
2
votes
0
answers
310
views
Linux swapper (process 0) could drain battery?
I add some debug messages to find which process could lead the battery drain.
If current mode is flight mode , there are only few processes that could wake up the system.
On the other hand , there ...
1
vote
1
answer
2k
views
IOS9 Push Battery Saver Mode - didReceiveRemoteNotification not called
On IOS9 if an iPhone is in battery save mode, the callback
application:didReceiveRemoteNotification:fetchCompletionHandler:
is not called. Instead I get the following warning in the console
...
24
votes
2
answers
6k
views
How to check if Android Lollipop battery saver is on
Android Lollipop introduced a battery saver mode that can be turned on at any time, and turns on by default when the battery is at 15% or lower. This poses a problem for my app, since the battery ...
7
votes
1
answer
1k
views
Saving power with location services by detecting user movement using sensors
I'm working on an app that tracks the user's whereabouts. In order to save battery, I want to implement an idle zone that makes the location manager pull less frequently (or even stop) on the GPS ...