Page 1 of 1

mobile datanetwork idle

Posted: 30 May 2014 09:51
by Akt
Is there any action which check wheather mobile data is being used or not. If it is idle for 30 sec., it should turn it off

Re: mobile datanetwork idle

Posted: 30 May 2014 14:49
by Martin
To my knowledge it's not possible to do this yet. I have some items on my todo-list to provide network traffic features, but I'm not yet sure what's possible to create using the official APIs of Android.

Perhaps you could build something like this using an action Init Variable Text File and read one of the system statistics file for the mobile interface, something like this:
Init Variable Text File: /sys/class/net/rmnet0/statistics/rx_packets and use an action Script or condition Expression to see of this value changed within the last 30 seconds.

Re: mobile datanetwork idle

Posted: 30 May 2014 15:18
by Akt
Hi martin
Thanx for help but can you please publish the flow as i am very weak in writing scripts!!

Re: mobile datanetwork idle

Posted: 31 May 2014 14:34
by Akt
Hi
I have tried to store the value in global variable but how to check wheather this value have been changed or not within 30 sec & what should be the trigger for this flow??

http://automagic4android.com/flow.php?i ... f4acfc6bc9

Re: mobile datanetwork idle

Posted: 31 May 2014 17:17
by BoBo

Code: Select all

matches(String s, String pattern) // ?
> action:script - examples

Re: mobile datanetwork idle

Posted: 08 Jun 2014 07:50
by Akt
Hi
Can you write the script ??

Re: mobile datanetwork idle

Posted: 08 Jun 2014 14:02
by colabi

Re: mobile datanetwork idle

Posted: 08 Jun 2014 14:38
by Akt
Thanx colabi
You solved my problem :-)

Re: mobile datanetwork idle

Posted: 09 Apr 2015 16:39
by progro
I load some flows with also get data from file, but in my unrooted ZOPO ZP999 with 4.4.2 there is no rmnet0 no statistics directory and no rx_ files.
Anyone a idea where i can find it?

Re: mobile datanetwork idle

Posted: 10 Apr 2015 12:00
by Martin
Hi,

You can try to use action Init Variables Network Traffic to load this information into variables. In the past there have been some issues with the API used by this action on a few Android versions and devices but theoretically it should work.

Regards,
Martin