-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with M's doze feature #65
Comments
Hi @msinkovich, I'don't have an M device but I could try to replicate what @mgranberry does for xDrip to work around Doze in M. |
Im using NightwWatch locally with xDrip. Ive set what I thought would work to be not optimized my Doze but it still will go into a suspend mode...I had a Wear screen shot to show you as well but in my infinite wisdom didnt save it so I will have to wait unitl it does it again and I will update the thread. |
Ok, so the broadcast from xDrip works, but the rest (background task) sending it to the watch doesn't? When not optimized, the app should be able to hold a partial wakelock. We had an issue with wakelocks solved in current master (merged a few days ago). May you try this? We'll have to look into M later on anyway, as loading the data via the network won't work in doze mode like it is now. But local broadcasts from xDrip should work. |
First, awesome app. I can't thank you enough! I am also having an issue with android M on the tablet that I keep near my bed to alert me about my son's BG. I don't get alerts late at night when I have the tablet set for priority notifications. I have heard that doze changed how notifications work. Here is a bit about optimizing apps for doze. Interesting tidbits about devices in doze mode: Hope this helps! |
It isn't immediately obvious to me how to fix doze support for NightWatch, but you can avoid doze entirely by plugging in the device that is dozing. The best that I know how to do without breaking doze completely is to have NightWatch wake every 15 minutes to refresh data while dozing. |
@mgranberry: waking just every 15 minutes does not sound promising. Then the value on the watch may be 17 minutes old before you get a new one (including some lag via the server). @msinkovich |
Hi @msinkovich, you didn't report back after I sent you the link. Did it work? |
Hey... Been meaning to get back to you on this.... Been overwhelmed with Thanks again for all your help.
|
I have multiple Marshmallow devices (as well as a Wear device and a Pebble) that I could test with. I will try to figure out how to compile APKs, but if anyone has a recent master build available and can post it somewhere I'd be happy to test and report back. |
@whoiswes, if you want I can build you one. Email me at adrian.m@inbox.com |
Ive been running the last linked version for a week or so and can say that the idle issue with doze looks to be solved. wouldn't hurt for a secondary tester to validate. |
Adrian was kind enough to send over a build from master, and after just overnight I can already say it's resolved a number of issues. First, on Android 6.0.1 / Wear 1.3, my watchfaces are remaining up to date - I no longer have to wake up the phone to get updates. Second, because Nightwatch is staying up to date, I'm not getting any missed reading alerts (was averaging 2-3x a night where I'd have to wake up my phone and clear the alarm. Also really loving having raw values available, as well as the uploader battery. I haven't had any other issues although I'm guessing I'll see a slight battery hit on my phone and/or watch - I will report back in a few days once any patterns have emerged. Thanks everybody! |
Just another quick followup, have had zero issues on the build Adrian sent, battery seems to be about the same on both the phone and watch, and I have had zero issues with the watchface being out of date. |
Thanks for the feedback @whoiswes. |
AdrianLxM ...what is the FB page? |
@msinkovich The fb-group is "CGM in the cloud". |
The MM updates are now in the latest beta version: https://github.com/StephenBlackWasAlreadyTaken/NightWatch/blob/master/Download.md |
Hi @AdrianLxM, sorry to bring back the topic. Could you point me to the code parts you changed in order to fix it? I'm having the same issue with the android uploader app for the standard Nightscout and I would like to give it a go. Thanks! |
@movigroup Take a look at the manifest for the permissions: How to set the timers wou can find in the diff for this file e.g.: And how to ask to disable battery optimization you will find in the diff from this file: Hope that helps. It is basically copied from Matthias Granberry's M adadaption of xDrip. |
I'll do my best thanks! |
@movigroup You can also ask in this gitter channel: https://gitter.im/nightscout/dexdrip |
@AdrianLxM jeez only now I'm having some time to look at it. |
@AdrianLxM never mind it seems I made it work. I'll share the code and send a pull request |
I know this is closed but Android N is coming soon and there have been some more changes to Doze mode. I found this website that goes in to detail about how to correctly incorporate real time notifications while a device is in doze instead of disabling battery optimizations. https://www.bignerdranch.com/blog/diving-into-doze-mode-for-developers/ |
as of last week or week prior, the app keeps crashing and fails to open. We use the app a lot and the wallpaper widget on all our phones. How do we resolve this please |
Its not an bug but with M the doze feature will stop the watchface from updating. I am going to try to look to see if there is workaround. Ive removed both xDrip and Nightwatch from Battery Optimization but that hasnt worked.
Any suggestions would be helpful
The text was updated successfully, but these errors were encountered: