mobile datanetwork idle

Post your questions and help other users.

Moderator: Martin

Post Reply
Akt
Posts: 133
Joined: 25 May 2014 08:57

mobile datanetwork idle

Post by Akt » 30 May 2014 09:51

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

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

Re: mobile datanetwork idle

Post by Martin » 30 May 2014 14:49

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.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: mobile datanetwork idle

Post by Akt » 30 May 2014 15:18

Hi martin
Thanx for help but can you please publish the flow as i am very weak in writing scripts!!

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: mobile datanetwork idle

Post by Akt » 31 May 2014 14:34

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

BoBo
Posts: 129
Joined: 05 May 2014 12:45

Re: mobile datanetwork idle

Post by BoBo » 31 May 2014 17:17

Code: Select all

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

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: mobile datanetwork idle

Post by Akt » 08 Jun 2014 07:50

Hi
Can you write the script ??


Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: mobile datanetwork idle

Post by Akt » 08 Jun 2014 14:38

Thanx colabi
You solved my problem :-)

progro
Posts: 7
Joined: 03 Apr 2015 20:58
Location: Germany

Re: mobile datanetwork idle

Post by progro » 09 Apr 2015 16:39

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?

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

Re: mobile datanetwork idle

Post by Martin » 10 Apr 2015 12:00

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

Post Reply