Will 'HTTP Request' work with phone switched off?

Post your questions and help other users.

Moderator: Martin

Post Reply
manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Will 'HTTP Request' work with phone switched off?

Post by manuel » 13 Jun 2014 18:48

As the subject says, if I create a flow with this trigger and then switch the phone off, but with the tick "Keep WiFi awake", will automagic wake up the phone and execute the flow?
In my tests it seems so, but I don't know if the phone can go to a "deeper" sleep. I'm using a Note 3 with Jelly Bean stock.

Edit: It seems that the phone in fact goes to a deeper sleep. Any way to prevent this?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Will 'HTTP Request' work with phone switched off?

Post by Martin » 13 Jun 2014 20:04

Hi,

It probably stops working when the device goes to deep sleep. On a few test devices the device is woken up and the flow is executed when a request is made.
How long does it approximately take until the trigger stops working on your device? When you turn on the display, does the trigger immediately work again?
What device, Android version and ROM are you using?

Regards,
Martin

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Will 'HTTP Request' work with phone switched off?

Post by manuel » 13 Jun 2014 21:09

Thanks for your response.
I did not made a thoroughly test but it seems that the trigger works just after switching off the phone and some seconds later (I would say less than a minute) it doesn't wake up the phone.
In the test I did, when I switched on the phone the trigger worked, but the phone get hanged and I needed to restart it.
As stated above, I'm using a Note 3 with Jelly Bean 4.3 stock.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Will 'HTTP Request' work with phone switched off?

Post by Martin » 14 Jun 2014 08:39

Sorry, I've missed that you already included the device/version.

I've made some tests with an S3 with 4.3 which is the most similar device I have access to.
When Keep WiFi awake is checked, the device is properly woken up when a request is made. When the device is in standby, it takes slightly longer until the flow is executed (about 1 second delay). The delay is much shorter when the device is awake (~200ms).
When Keep WiFi awake is not checked and Keep Wi-Fi on during sleep is set to Never in the advanced WiFi settings of the device, the flow stops responding after a few minutes but starts to work again when the display is turned on (the system also posts a notification on screen that WiFi was reconnected).

Does the trigger work when you set Keep Wi-Fi on during sleep to Always in the advanced WiFi settings (system settings->Wi-Fi->Menu->Advanced)?
You can also test if it helps when the device CPU is forced to stay awake. To do this, create a new flow with just a trigger Shake and enable the flow.

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Will 'HTTP Request' work with phone switched off?

Post by manuel » 14 Jun 2014 13:38

Even with Wi-Fi on during sleep to Always there are times in which it doesn't work. My guess is that it depends on the "depth" of the sleep (for example if the SO disconnect the WiFi or something like that).

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Will 'HTTP Request' work with phone switched off?

Post by Martin » 14 Jun 2014 16:49

Is the trigger executed reliably when you add a trigger Shake in an enabled but otherwise empty flow?

manuel
Posts: 27
Joined: 05 Jul 2013 20:54

Re: Will 'HTTP Request' work with phone switched off?

Post by manuel » 14 Jun 2014 20:08

Funny thing is that now it seems to execute reliably. I'm not able to replicate the fail, no matter what I do.
May be I did something wrong previously.

Thanks

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Will 'HTTP Request' work with phone switched off?

Post by Martin » 15 Jun 2014 16:29

I'm glad it's working now :-)

One more idea if this should happen again in the future: it would be interesting to see whether the system turned off the CPU or only turned off the Wi-Fi. To see this, you can open system settings->Battery, touch the graph and check if there's a blue bar for Wi-Fi or Awake.

Post Reply