Open jeekajoo opened 8 years ago
Thanks for the report, I could reproduce the bug, I'm looking into it.
It seems that the problem is coming from android "battery saving" system which refuses some connections from background services. According to the documentation, the app should wait for the right time to do network calls, in order to save battery life.
Temporary, "un-optimising" the application is a good solution. Because the app only makes one or two network calls (in order to post the link), it should have no effect on your battery life. But I understand that it is a suboptimal solution.
I was trying to understand why Shaarlier is considered as a background app, and I found this:
When an app enters standby mode, network access is disabled, and syncs and scheduled jobs all get shut down. The app won't be able to run any background services. "Using" an app for the purposes of App Standby counts as the user opening the app, starting a foreground service or having its foreground service used by another app, or generating a notification. If none of those things happen, then the app is at risk of being put into standby. http://arstechnica.com/gadgets/2015/10/android-6-0-marshmallow-thoroughly-reviewed/9/
Ok, so for the moment it will be a won't fix, if I want to keep the sharing in the background (in a non blocking way) I must use GCM and for this application I don't want to be too dependant on Google services.
The other workaround is to ask the user to "disable battery optimization", but for some reasons, Google remove apps asking for this request.
So, unless I find a way to do the web request in the foreground (I mean called from a foreground thread), the bug won't be fixed. I may document this issue to avoid future surprises from other users.
Hi, When using battery saver, sharing does not work. As soon as I tell Android not to optimize
shaarlier
, sharing works again.If we can't get around it, I think it should be at least documented.
Rom: Omnirom Android: 6.0.1
Thanks J.