Need some assistance on Cell GSM flow
Posted: 30 Jul 2015 13:27
I have a Nexus 4 (with Android 5.1.1) and have used Automagic to automatically turn my WiFi on/off using a "Periodic Location Update" every 15m. If the location was at home, the flow would turn WiFi on (as long as battery was ok, etc.), else it would shut WiFi off to save my battery. Has worked great for me. But recently I've seen some apps that control the WiFi via which cell phone tower they're connected to (or around). This type of "check" apparently conserves more battery than doing the "Location Update".
So, I created a flow that has a trigger on "Phone Cell GSM". I'm using the "Classic & Modern" method and collected the cells. Only one showed up (sometimes a second shows up). I chose the one cell under the "Location Area Code (LAC) List" and also the selected the "Cell ID (CID) List" with the one that showed up in there. I set the trigger to activate on "Connected" AND "Disconnected". The very next step after the trigger is a condition where I evaluate an expression "if(connected) true else false;" If True it branches to set WiFi On, if False it branches to Set WiFi Off. When I turned on the flow, it worked and set my WiFi on. Sweet! But whenever I run the flow manually it sets WiFi to Off. Why is "connected" always False when running the flow manually?
1). Is using this Phone GSM trigger better than using the periodic location update from a battery perspective?
2). Should I use two flows instead of one (i.e. one where I just check if I'm "Connected" to a cell tower to turn WiFi on and another flow to check if "Disconnected" to turn WiFi off? I was hoping/thinking that I could do all this in one flow.
3). What would be the best way (examples) of writing this kind of flow?
4). Does anyone know if the Nexus 4 updates the Phone Cell GSM when the screen is off or if I need to "Wake device every 15m" and "Force update"? Seems like the Force causes more battery use and thus this might be equivalent to the location check?
Thank you for your time and help.
Kind Regards,
Data
So, I created a flow that has a trigger on "Phone Cell GSM". I'm using the "Classic & Modern" method and collected the cells. Only one showed up (sometimes a second shows up). I chose the one cell under the "Location Area Code (LAC) List" and also the selected the "Cell ID (CID) List" with the one that showed up in there. I set the trigger to activate on "Connected" AND "Disconnected". The very next step after the trigger is a condition where I evaluate an expression "if(connected) true else false;" If True it branches to set WiFi On, if False it branches to Set WiFi Off. When I turned on the flow, it worked and set my WiFi on. Sweet! But whenever I run the flow manually it sets WiFi to Off. Why is "connected" always False when running the flow manually?
1). Is using this Phone GSM trigger better than using the periodic location update from a battery perspective?
2). Should I use two flows instead of one (i.e. one where I just check if I'm "Connected" to a cell tower to turn WiFi on and another flow to check if "Disconnected" to turn WiFi off? I was hoping/thinking that I could do all this in one flow.
3). What would be the best way (examples) of writing this kind of flow?
4). Does anyone know if the Nexus 4 updates the Phone Cell GSM when the screen is off or if I need to "Wake device every 15m" and "Force update"? Seems like the Force causes more battery use and thus this might be equivalent to the location check?
Thank you for your time and help.
Kind Regards,
Data