It is currently Thu Mar 30, 2017 3:40 pm

Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Marshmallow 'Doze' and BASIC!
Unread postPosted: Sun Mar 19, 2017 7:36 am 
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1112
Location: From Blighty
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..."

  GPS.SATELLITES 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$
GPS.TIME gpsTime
  systemTime$ = INT$(i) + " | " + "System time: " +  hour$ + ":" + minute$ + ":" + second$
  PRINT systemTime$
  gpsTime$ = "    GPS time   : " + USING$ ("", "%tT", INT(gpsTime))
  PRINT gpsTime$
  IF satellites > 0 THEN
    satellites$ = "    Number of satellites: " + INT$(satellites)
  PRINT satellites$
    satellites$ = "    * GPS failed."
  PRINT satellites$
  file$ = systemTime$ + CHR$(13) + gpsTime$ + CHR$(13) + satellites$ + CHR$(13)
TEXT.WRITELN doze, file$

    PAUSE 1
  UNTIL CLOCK() - elapsed > 300000
  elapsed = CLOCK()

PRINT "Back key pressed to exit."

Research list:- ... stand_doze ... -doze-mode ... _use_cases


Report this post
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: