No, this is possible with standard tasker actions. Bellow is the task to collect current value of data transferred and sent on all interfaces. It can be modified to check data for wifi only. However if wifi is on all data should go over it so measure of total traffic is enough. I use this function to decide if its ok to turn data connection off. I make one measurement and then another in 30sec. If differnce is less than some treshold it is safe to switch off wifi.
func-getTotalB (15)
Run Both Together, Stay Awake
A1: Read Paragraph [ File:/proc/self/net/dev Para:1 To Var:%tet ]
A2: Variable Set [ Name:%newline To:
Do Maths:Off Append:Off ]
A3: Variable Split [ Name:%tet Splitter:%newline Delete Base:Off ]
A4: For [ Variable:%line Items:%tet(3:) ]
A5: Variable Split [ Name:%line Splitter: Delete Base:Off ]
A6: Variable Add [ Name:%rxb Value:%line2 Wrap Around:0 ]
A7: Variable Add [ Name:%txb Value:%line10 Wrap Around:0 ]
A8: End For
A9: Variable Set [ Name:%totalb To:%rxb+%txb Do Maths:On Append:Off ]
A10: Return [ Value:%totalb Stop:On ]
There is the trick with %newline variable which is not visible. In set variable dialog you have to press enter key.
There is the trick with %newline variable which is not visible. In set variable dialog you have to press enter key.
26.02.2012 15:35 пользователь "TW" написал: