It is currently Sat May 27, 2017 11:38 pm



Welcome
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  [ 5 posts ] 
Author Message
 Post subject: Marshmallow 'Doze' and BASIC!
Unread postPosted: Sun Mar 19, 2017 7:36 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1135
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.

Code:
GPS.OPEN
WAKELOCK 1

TEXT.OPEN w, doze, "marshbas.txt"
PRINT "* Doze mode Marshmallow test *"
PRINT "Log: /rfo-basic/data/marshbas.txt
PRINT "Waiting for satellites..."

DO
  GPS.SATELLITES satellites
  PAUSE 1
UNTIL satellites > 0

PRINT "Program will check every 5 minutes. Press power button, do not disturb device, and keep unplugged."

elapsed = CLOCK()

DO
  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$
GPS.SATELLITES satellites
  IF satellites > 0 THEN
    satellites$ = "    Number of satellites: " + INT$(satellites)
  PRINT satellites$
  ELSE
    satellites$ = "    * GPS failed."
  PRINT satellites$
  ENDIF
  file$ = systemTime$ + CHR$(13) + gpsTime$ + CHR$(13) + satellites$ + CHR$(13)
TEXT.WRITELN doze, file$
TEXT.CLOSE doze

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

ONBACKKEY:
PRINT "Back key pressed to exit."
END


Research list:-

https://developer.android.com/training/ ... stand_doze

http://stackoverflow.com/questions/3228 ... -doze-mode

https://developer.android.com/training/ ... _use_cases

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Marshmallow 'Doze' and BASIC!
Unread postPosted: Tue Apr 25, 2017 3:11 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1135
Location: From Blighty
Hmm... Although the code works it got stuck on just showing 1 satellite and when lost duplicating the same time stamp and info. I have environmental issues where I am it seems. In theory, you need line of sight of at least 3, which should be overhead at any given time for GPS to work I know, but if I'm in line of sight of at least one to pick up for this experiment it won't matter.

I read this post:-

gps-can-t-refresh-after-i-turn-off-t2788.html

Aat showed an idea that I can incorporate in this. But I guess I might shelve this post for now...

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Marshmallow 'Doze' and BASIC!
Unread postPosted: Tue Apr 25, 2017 6:12 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
Mog wrote:
Hmm... Although the code works it got stuck on just showing 1 satellite and when lost duplicating the same time stamp and info. I have environmental issues where I am it seems. In theory, you need line of sight of at least 3, which should be overhead at any given time for GPS to work I know, but if I'm in line of sight of at least one to pick up for this experiment it won't matter.

Erm, are you living in a cave? You should be able to see lots of GPS satellites even in daylight...

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Marshmallow 'Doze' and BASIC!
Unread postPosted: Tue May 02, 2017 7:29 pm 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
It hasn't shown any effect on BASIC!, but I suspect that was the problem when BASIC! Launcher quit working.
Turned it off for Launcher and have had no more problems.
Settings/Battery/three dots/battery Optimizer/All Apps and click Don't Optomize.


Report this post
Top
 Profile  
 
 Post subject: Re: Marshmallow 'Doze' and BASIC!
Unread postPosted: Thu May 04, 2017 7:33 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1135
Location: From Blighty
@Mike, yeah there should be at least 3 or 4 over your head at anyone time... 4 to get the right time data I believe...

Thanks for the test cavelamb,

I don't have the options under settings that you have as such, there is and always has been a built in Power Manager app on my Samsung Device (pre-Marshmallow was Lollipop) with the ability to activate and deactivate apps or in automatic mode, it puts some to sleep after 3 days if not in use (I ponder if this is using more power than it's worth though!).

There's an ultra saving power mode that limits apps on the home screen and makes the screen black and white.

I assume the 'Doze' feature is still abounds on my device despite what the manafacturer has done?

I've always noticed some "sleep nature" on my phone, for instance you press the power button when the phone has been idle and the clock suddenly jumps 2 minutes to the correct time[?].

I think I just get over zealous about battery life, sometimes something's are going to be insignificant anyway because if you are in a poor signal area on the radio side that's going to kill your battery.

I did a daft experiment last summer and used a LW radio close by, tuned to a empty frequency to hear what my phone pulsed out. I made sure I was away from any third-party sporadic stuff. Interesting. Sometimes searching for a cell, that 'dat dada dat' noise; sometimes a very short burst [I'm assuming the phone was just saying "Hello, I'm still here" to the network, apps sending/receiving data.]. Some apps like Messenger pulsing out over a minute in length when in an on off discussion...

I best stop as sounding like a nutter...!

I looked under developer options too, to see if there were relevant battery life saving techniques -- none.

In my opinion this 'Doze' feature is a bit rubbish, obviously it's not going to help a device that's in use constantly, but I'm suspicious it makes no difference to the reality useage of a smartphone...

On the subject of batteries, found this article to peruse...

http://www.pocket-lint.com/news/130380- ... er-the-air

Mog


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


Who is online

Users browsing this forum: No registered users and 4 guests


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:  
suspicion-preferred