You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Solution for developers" section is great, but even better would be if that section had two sub-sections:
How to detect
How to workaround
I imagine that there might be some cases where it's possible to detect, but not workaround. And in that case we could simply show the user some info, like ”This app is being choked by your phone, here's how to fix it blah blah blah”.
The text was updated successfully, but these errors were encountered:
Hello, this is good idea. But unfortunately at the moment do not know about a single vendor where you could detect this directly, so this section would be truly virtual.
On stock Android you can find out that battery saver is running, but I don't this this has direct effect on background processes anyway. You can see if app is or is not optimized on stock Android..
But for other vendors you would need to run a detection background process.. run something for quite a long time when not on charges for instance and see if it runs all the time..
Right, on stock Android – and in general but with limited usefulness – you have android.os.PowerManager#isDeviceIdleMode() and android.os.PowerManager#isIgnoringBatteryOptimizations(java.lang.String).
When it comes to detecting if you are affected by any (vendor-specific) optimizations, our go-to solution has always been setting some flags or storing logs during the execution of background tasks or on delivery of notifications, so that you can check for success when the app is in the foreground the next time.
The "Solution for developers" section is great, but even better would be if that section had two sub-sections:
I imagine that there might be some cases where it's possible to detect, but not workaround. And in that case we could simply show the user some info, like ”This app is being choked by your phone, here's how to fix it blah blah blah”.
The text was updated successfully, but these errors were encountered: