Request: Flow that measures wifi & mobile data
Posted: 10 May 2015 05:07
Bottom Line Up Front: I would like help developing a flow that measures wifi and mobile data and then turns them off if the traffic doesn't meet a specific threshold.
I have tried a few flows from this forum but they all seem to measure "0" for rx_bytes whether I'm on mobile data or wifi, and whether I'm downloading/uploading something or not. I read about the newish init variable network traffic but am unsure of how to use it (somewhat of a newb). Here's what I imagine this flow would generally look like:
Measure Wifi Data -> Store measurement -> sleep Y seconds -> measure Wifi data -> subtract new measurement from old measurement -> if less than X, disable wifi and proceed (if greater than X, loop back to beginning):
Measure Mobile Data -> Store measurement -> sleep Y seconds -> measure mobile data -> subtract new measurement from old measurement -> if less than X, disable mobile data (if greater than X, loop back to take new measurement).
Thanks in advance for the help.
Edit: I've tried/combined so many flows from others that I've lost track of who I've plagiarized in the sample flow below...sorry to whoever it is.
I'm on Rooted Verizon S5, 5.0 stock
Sample Flow: http://automagic4android.com/flow.php?i ... 47071a552b
I have tried a few flows from this forum but they all seem to measure "0" for rx_bytes whether I'm on mobile data or wifi, and whether I'm downloading/uploading something or not. I read about the newish init variable network traffic but am unsure of how to use it (somewhat of a newb). Here's what I imagine this flow would generally look like:
Measure Wifi Data -> Store measurement -> sleep Y seconds -> measure Wifi data -> subtract new measurement from old measurement -> if less than X, disable wifi and proceed (if greater than X, loop back to beginning):
Measure Mobile Data -> Store measurement -> sleep Y seconds -> measure mobile data -> subtract new measurement from old measurement -> if less than X, disable mobile data (if greater than X, loop back to take new measurement).
Thanks in advance for the help.
Edit: I've tried/combined so many flows from others that I've lost track of who I've plagiarized in the sample flow below...sorry to whoever it is.
I'm on Rooted Verizon S5, 5.0 stock
Sample Flow: http://automagic4android.com/flow.php?i ... 47071a552b