Recently, I upgraded to Marshmallow and was wondering what effect this would have on BASIC!.
In short, what I understand is this:-
'Doze' mode interferes with applications that require constant connectivity, with some exclusions to Social Media apps. But not affecting the 'radio' side, text messaging, phone calls... It's all about trying to save battery life.
'Doze' works when your device is idle, say laying flat on a table and not being disturbed and unplugged from a charger or USB.
Has anybody done any tests with their apps on devices with this?
I thought I conduct an experiment with GPS... I can't do this until overnight (It's Sunday afternoon here in the British Isles). So I'm posting now, with any thoughts if this may work. Any amendments or other information to offer would be good!
I'll post my own results on Monday morning.
So, I've put down this code for maybe fellow users to try, if they so wish to maybe participate in a collective experiment. It runs every five minutes and puts .txt log in the data folder of BASIC!. You just need to push the power button in to put the device to sleep and lay it idle somewhere.
Note:- The way I coded the text file was to overwrite any previous data. I must remember this (best have my pot of early morning tea first) and also hope Android doesn't close my program down to clear up space for RAM reasons!
I will also put my phone into flight mode first as GPS still works.
TEXT.OPEN w, doze, "marshbas.txt"
PRINT "* Doze mode Marshmallow test *"
PRINT "Log: /rfo-basic/data/marshbas.txt
PRINT "Waiting for satellites..."
UNTIL satellites > 0
PRINT "Program will check every 5 minutes. Press power button, do not disturb device, and keep unplugged."
elapsed = CLOCK()
TEXT.OPEN a, doze, "marshbas.txt"
i = i + 1
TIME , , , hour$, minute$, second$
systemTime$ = INT$(i) + " | " + "System time: " + hour$ + ":" + minute$ + ":" + second$
gpsTime$ = " GPS time : " + USING$ ("", "%tT", INT(gpsTime))
IF satellites > 0 THEN
satellites$ = " Number of satellites: " + INT$(satellites)
satellites$ = " * GPS failed."
file$ = systemTime$ + CHR$(13) + gpsTime$ + CHR$(13) + satellites$ + CHR$(13)
TEXT.WRITELN doze, file$
UNTIL CLOCK() - elapsed > 300000
elapsed = CLOCK()
PRINT "Back key pressed to exit."
Research list:-https://developer.android.com/training/ ... stand_dozehttp://stackoverflow.com/questions/3228 ... -doze-modehttps://developer.android.com/training/ ... _use_cases