Comments (26)
Hi @msinkovich,
do you use NightWatch with xDrip locally or pull the data from NightScout or Share?
I'don't have an M device but I could try to replicate what @mgranberry does for xDrip to work around Doze in M.
from nightwatch.
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.
from nightwatch.
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?
If you don't know how to self-compile it, I contact me and I can send you an apk.
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.
from nightwatch.
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.
http://developer.android.com/training/monitoring-device-state/doze-standby.html
Interesting tidbits about devices in doze mode:
The system ignores wake locks
Network access is suspended.
Doze is particularly likely to affect activities that AlarmManager alarms and timers manage, because alarms in Android 5.1 (API level 22) or lower do not fire when the system is in Doze.
Hope this helps!
from nightwatch.
Sorry...I meant to reply earlier. I dont yet know how to compile a new apk so if you could compile it I would be happy to test it out. On another note this is a screenshot of the watch when Doze causes NightWatch to stop uploading live data.
as soon as I wake up the phone and start working with it the data is refreshed.
from nightwatch.
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.
from nightwatch.
@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).
I'd rather break Doze and not have the advantages of lower battery consumption and risk not getting accepted to the play store - but still can query the server every 5 minutes.
@msinkovich
I have no experience with dose, but that really sounds like it still could be the simple wakelock issue in the current .apk. Please send me an email to [email protected] and I will pack you an apk of current master.
from nightwatch.
Hi @msinkovich, you didn't report back after I sent you the link. Did it work?
We now also have a Marshmallow branch where the basics of Marshmallow (at least in theory) are covered.
from nightwatch.
Hey... Been meaning to get back to you on this.... Been overwhelmed with
the holiday and entertaining my family... I'll get back to you soon with my
impressions on Monday.
Thanks again for all your help.
On Nov 27, 2015 2:52 PM, "AdrianLxM" [email protected] wrote:
Hi @msinkovich https://github.com/msinkovich, you didn't report back
after I sent you the link. Did it work?
We now also have a Marshmallow branch where the basics of Marshmallow (at
least in theory) are covered.—
Reply to this email directly or view it on GitHub
#65 (comment)
.
from nightwatch.
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.
from nightwatch.
@whoiswes, if you want I can build you one. Email me at [email protected]
from nightwatch.
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.
from nightwatch.
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!
from nightwatch.
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.
from nightwatch.
Thanks for the feedback @whoiswes.
Jason published the link to the apk on fb today to have a broader test group.
from nightwatch.
AdrianLxM ...what is the FB page?
from nightwatch.
@msinkovich The fb-group is "CGM in the cloud".
The link to the apk: edit: it is now in the lateste Beta 2.0.4: https://github.com/StephenBlackWasAlreadyTaken/NightWatch/blob/master/Download.md
from nightwatch.
The MM updates are now in the latest beta version: https://github.com/StephenBlackWasAlreadyTaken/NightWatch/blob/master/Download.md
from nightwatch.
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!
from nightwatch.
@movigroup
You could take a look at this Pull-Request: https://github.com/StephenBlackWasAlreadyTaken/NightWatch/pull/71/files
Take a look at the manifest for the permissions:
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
How to set the timers wou can find in the diff for this file e.g.:
mobile/src/main/java/com/dexdrip/stephenblack/nightwatch/DataCollectionService.java
And how to ask to disable battery optimization you will find in the diff from this file:
mobile/src/main/java/com/dexdrip/stephenblack/nightwatch/activities/Home.java
Hope that helps. It is basically copied from Matthias Granberry's M adadaption of xDrip.
I'm glad to hear that someone starts working again on the wired uploader :)
from nightwatch.
I'll do my best thanks!
May I bother you again if in need? I'm not that skilled unfortunately...:)
from nightwatch.
@movigroup
Asking questions doesn't cost a thing ;)
But I also just read the documentation and ported the code from Matthias.
You can also ask in this gitter channel: https://gitter.im/nightscout/dexdrip
from nightwatch.
@AdrianLxM jeez only now I'm having some time to look at it.
I'm not even an half decent programmer so I appreciate your help.
The code in practice create a fake alarm and then moves it again so that the system is never dozing?
Can you also point me to Matthias Granberry's M adaptation of xDrip? I'm not entirely sure where is the best place to add the alarms management in the uploader code so I hope I can get a hint from that. Or maybe you could suggest me something?
from nightwatch.
@AdrianLxM never mind it seems I made it work. I'll share the code and send a pull request
from nightwatch.
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/
from nightwatch.
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
from nightwatch.
Related Issues (20)
- Dexcom share
- Dexcom g6
- No data from dexcom app to nightwatch HOT 7
- Dexcom not sending reading to Nightwatch HOT 2
- Dexcom G6 is not sending any info to the Night watch app HOT 3
- High battery usage
- Not updating to watch HOT 1
- Nigthwatch loaded not showing, solution
- Upgraded to new phone but nightwatch wont work! HOT 15
- Managing Two Dexcom Profiles
- Stopped working today HOT 30
- Mine stopped working at around 4:30 EST
- Nightwatch stopped working
- Stopped working
- Nightwatch not getting data from dexcom HOT 1
- NightWatch Android down? 12/8 730pm est HOT 50
- App stopped working
- Dexcom G6
- Stopped working after phone update.
- Feature Requests: Glucose Number as Notification Bar Icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nightwatch.