yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Iceax123:
Re: Tasker solution: Screen off=wifi/data off if no traffic

Just one last question if I may.

Using this if I turn of data as well will that stop any emails coming in.

I have 3g turned off so am always on 2g but would still want push mail from one account to get through

Thanks
[Android Apps and Games] Iceax123:
Also found another issue now :(

I have a rule set up so when connected to works wi-fi my ringer and notifications are set to low.

But now when i turn my screen off wifi drops and my volume goes up. ARGHHHHH

Andy
[Android Apps and Games] parthipanramesh:
Look in the OP!! New version ;)

Yes it will turn generally data off. 2g or 3g it doesn't matter.

It have nothing to do with my profiles and tasks. They only enable connections, check traffic and disable the conncections. Maybe another profile isn't working correctly.

And next time you can edit your post. You don't need to make 3 posts. ;)
[Android Apps and Games] Iceax123:
Thanks again parthipanramesh, will import these tonight and try :)

Andy
[Android Apps and Games] bluesfear:
I am new to tasker and i have been fiddling with it.

How would I add auto sync turns on every 15 minutes when screen is off and auto sync turns on when screen is on to this "script"?
[Android Apps and Games] s1m4an:
Thanks, it should work now.

However now there's another issue, which will need some rethinking - while on wifi, screen off turns the wifi off if there's no activity (like it should), and then there's no call to turn off data (because the phone falls back to data if there's no wifi), so I'll have to think of a way to call Data (screen off) while the screen is already off (and I'd hate to use a timer).

Well it was easier than I thought at first :D
[Android Apps and Games] iMakeTea:
Those are some awesome scripts man, good work! They're exactly what I needed. People kept recommending tasker, but once I got it, it was very hard to set up a proper profile. Luckily google sent me here!

I have a couple of requests though:

1) Is there anyway to set up a profile to disable airplane mode when screen is on?

I have trouble sleeping and I'll usually go online with my phone at random times in the night so that would be very convenient.

2) 4G and 4G LTE for T-mobile seems to be connected and not turned off while screen is locked.

I still see the little icon for it in my notification bar at the top, but I have yet to see it transmitting anything via green or red download/upload arrows being on. Is this an error, or the way it's supposed to work?

Edit: Is the 4G icon being present even while locked mean that I can receive calls and text immediately while mobile data is off?
[Android Apps and Games] 12gage:
Thank you for these scripts, I've been trying to find a replacement for JD so I don't have to run it and Tasker at the same time. I have warnings on a couple of tasks that is preventing the profile from running. I have Secure Settings installed, is there anything else I need? I'm running 1.3
[Android Apps and Games] parthipanramesh:
Sorry I was busy for the last few days. :/

First thanks for your nice words!! :)

1) You could create a new profile (conditions: screen on, if %SLEEP ~ 1) with a normal task which disables airplane mode. Add a exit task which enables airplane mode again to the profile or it won't turn airplane mode on after you turned the screen off.

2) Normally it should show the normal signal icon without a letter (4G, 3G, H, E,G..). Maybe you're phone is using a different rmnet module or how they call it. Look in the Screen off (Data) task. There you can see in the 3rd action this shell command: cat sys/class/net/rmnet0/statistics/rx_bytes

The rmnet0 is not the same for all devices. You have to look in the sys/class/net/ file and try it with your rmnetX or something like that. Which phone do you have? :)

Hope this helped you a bit!

Does the both tasks exist in your tasker? Did you import them?
[Android Apps and Games] 12gage:
I moved over everything from the task folder in the zip, I didn't see one called SigReturn or SigLost
[Android Apps and Games] parthipanramesh:
Ok so you didn't import the Reduce Cell Standby project. That's fine you can remove both actions which are giving you the error ;)
[Android Apps and Games] 12gage:
Thank you, how do I have wifi stay on if connected with the screen off? It keeps shutting off
[Android Apps and Games] parthipanramesh:
Just remove the exit task "Screen off (Wifi)" from the "Display (Wifi)" profile. You're welcome! Hit the "thanks" button next time ;)
[Android Apps and Games] 12gage:
thanks again, and I hit all three thanks buttons ;) Is there a way to have the screen on data profile set to not activate if wifi is connected? I'm pretty new to tasker, I don't know if I'm suppose to set priorities to them or not
[Android Apps and Games] parthipanramesh:
Thanks dude and you're welcome. :) It won't activate if wifi is connected because the Display (Data) has a "if %CONNECTION doesn't match 1" condition and the profile Wifi conncted sets the variable %CONNECTION to 1 if you're conncted. (and delete the "1" if you are disconncted). You could remove the %SLEEP ~ !1 condition or it won't work when the night profile is active.
[Android Apps and Games] 12gage:
thanks so much, and I'm sorry for being needy I just don't quite get the in's and out's of Tasker yet. My Mobile Data won't shut off for some reason, Tasker shows that the Display (Data) is running and not Active because Wifi is connected but it's still toggled "on" in my settings.
[Android Apps and Games] MorphiousGX:
I'm familiar with Tasker. However I'm seeing some odd behavior. Maybe someone can help me understand it our fix it.

First: At night, I'd like to still keep my cell radio on to be have inbound/outbound calls/texts. I modified step #2 under beginning of night by injecting cell from list. That didn't help. Any ideas?

Second: I have Bluetooth enabled. When night time profile begins and enters airplane mode, Bluetooth still is active. Why?

Third: I noticed that S-Beam gets turned off when NFC is turned off. Any way I can turn both on when airplane gets turned off?

I am using JB 4.1.2 on Galaxy S3 and also have secure settings installed
[Android Apps and Games] iMakeTea:
I have the Galaxy Note II from T-Mobile. It's the SGH-T889. I'm trying to find the rmnet file for my note II but no luck.

Also, I did get a working profile set to turn Airplane Mode on when the screen is on and off when the screen is off. Thanks!
[Android Apps and Games] parthipanramesh:
1st: Yeah it doesn't work for me, too. At first I thought it's phone related but I'm not sure. You could remove both secure setting actions and create a new action which disables mobile data.

2nd: Same like 1st. Add a action which disables Bluetooth and turns it back on in the end of night task.

3rd: Sorry I can't help you cz I have a Nexus device and it doesn't have the S stuff. :/

Hmm.. Download terminal emulator from Play Store. Type:

su

cd sys/class/net/

ls

Then you should see a list of all files which are in that directory. Btw the command "su" is for getting root permission ;)

Good to that it's working and you're welcome!
[Android Apps and Games] 12gage:
I'm still having an issue when my Wifi is connected it isn't killing my data when the screen is on, is there anything I can try? I'm using the Wifi connected profile, doesn't that keep mobile data from turning on regardless if the screen being on if Wifi is connected? Thanks in advance.
[Android Apps and Games] ktmbikerman:
Airplane mode plugin

Hello, I'm brand new to tasker and found this thread in an attempt to get going. I imported the entire contents of the v1.3 zip into Tasker, but have some tasks and profiles with errors. They all seem to be related to an airplane mode plugin that needs to be installed. Could someone please educate me?

Thanks
[Android Apps and Games] remidesroques:
Do you have Secure Setting installed? You need that plugin for that command if I recall:

https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin&hl=en
[Android Apps and Games] parthipanramesh:
Yes the mobile data will stay enabled but your phone will use wifi. If you want to disable it though you could add a action (disable mobile data) to the wifi connected task and (enable mobile data) to the wifi disconnected task.

Install Secure Settings from the Play Store like remidesroques said. ;)
[Android Apps and Games] cub3r:
First of all, thanks for the Tasker profile! I works well with my phone, I just have one question, is this profile turn off data when the screen off? Can I change it to turn into Edge instead completely off? Thanks :)
[Android Apps and Games] parthipanramesh:
You're welcome! :) Yes of course, you just have to replace the action (mobile data → off) with the action to switch to edge. The action is called "Mobile Data 2G/3G" in the category network.
[Android Apps and Games] cub3r:
I don't really understand.. Is it from here?
[Android Apps and Games] parthipanramesh:
Yeah it's the mobile data one. Replace it with "Mobile Data 2G/3G". Do you understand?

Sent from my Galaxy Nexus powered by Paranoid Android and Ak Diamond
[Android Apps and Games] cub3r:
I can't find it.. Sorry.
[Android Apps and Games] parthipanramesh:
Net - Mobile Data 2G/3G

Look at my screenshots.

Sent from my Galaxy Nexus powered by Paranoid Android and Ak Diamond
[Android Apps and Games] cub3r:
Unlucky for me, it says the action it's not available for this device. :(
[Android Apps and Games] parthipanramesh:
Oh I'm sorry for you. I can't use airplane mode and that stuff. That's why I have to install secure settings :/ I don't know a plugin which could solve your problem sorry :(

Sent from my Galaxy Nexus powered by Paranoid Android and Ak Diamond
[Android Apps and Games] 12gage:
I just started having problems with Tasker not turning off/restarting my mobile data, and I couldn't toggle manually either. Seems to be related to Secure Settings, once i uninstalled it my mobile data worked again. Any suggestions?
[Android Apps and Games] vlag24:
how about Airplane Mode Helper ? > http://xdaforums.com/showthread.php?t=2225388&highlight=airplane
[Android Apps and Games] thechaoz:
I tried flashing the latest version and it was buggy..I have a galaxy note 2 on a tw Rom...tasker makes my head hurt...all I'm trying to accomplish is to disable mobile data/wifi when screen it's off unless streaming music,downloading,etc...then re enable with screen unlock....no night mode, ...

I tried tweaking the profile but seems some are interconnected..thanks in advanced
[Android Apps and Games] workdowg:
Ditto
[Android Apps and Games] remidesroques:
Hi guys,

I have a custom version that I would like to share with you if you are interested! I don't use 3g and have a pocket wifi so I disabled and erased everything about mobile data.

I also added two buttons on my home screen (icons are from kyo-tux aeon collection) to keep the wifi on always and one to launch the Sleep procedure in case I go to sleep earlier than the set time (but will revert if the screen is turned back on and the set sleep time condition is not true) .

The wifi will always turn on, at anytime of the day and night if I turn the screen on.

I also added a charging condition so when it is plugged to a charger the wifi always stays on.

There are many changes and I would love to know if y'all could check it and let me know if I can make it better.

There us also a function to turn off the always on wifi task if the screen is off for like 2 hours in case you just forgot to switch back the always on mode to normal.

Peace

Download here :

https://www.box.com/s/lc47l637hcci6fdg5e7e
[Android Apps and Games] thechaoz:
Still looking for something like this..ty

Jelly beans 13 with Perseus kernel banging note 2 i-605
[Android Apps and Games] remidesroques:
What about running a shell command to detect if your music app is on?

cat /proc/$(pidof com.plexnor.gravityscreenoffpro )/oom_adj

Com.whatever is the package name of your app. Look at the link on the Google play on the PC and you will get the package name of the app you want to detect.

I forgot the value that it returns but it's something like 0 the app is not on

1 the app is in the background

2 the app is in forefront.

Just test it and see what it returns. Make also a search on Google with that shell command and you should find some help

______

No one reported back on the version I posted but people have been downloading it. Anyone?

Don't forget to thank if you enjoyed it...
[Android Apps and Games] workdowg:
The project has the same name as this one. I haven't wanted to remove this one to try yours yet...

Sent from my ASUS Transformer TF700t - CROMi-X 4.5 ODEX
[Android Apps and Games] remidesroques:
I see. Let me change it!

Here is the new link (I called it Battery2)

https://www.box.com/s/qo5d1140gklferd9zljm
[Android Apps and Games] thechaoz:
Tried...lots of people do much more complicated things...guess I'll have to figure it out myself

Jelly beans 13 with Perseus kernel banging note 2 i-605
[Android Apps and Games] parthipanramesh:
I think you're device uses another interface than my. Download terminal emulator and type:

su

cd sys/class/net/

ls

Then you should see all your network interfaces. rmnet0, wifi0 and so on. Replace the shell command from the screen off (display) and the screen off (wifi) task with your values. Normally it should solve your problems. If not feel free to contact me. :)

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] sea2605:
I'm loving this script and used it for a while, but it will drain my battery life more than it will save it: it leads to a high wifistatemachine wakelock (guess because its always looking for the download). Android system therefore takes up to 40% and sometimes even passes my screen (which is a large 5 inch hd-display!), so my screenon time drops at least 1-1.5h! Tested several times.

Switch all these scripts off: wifistatemachine and therefore android system drop back to normal and my battery life goes back to normal.

I waited for two (maybe 3) fw updates of my phone and always tested this script again after updating: same result. Full wipe of my phone: same result. So its not some issue with my phone.

How could I solve that?!

Ps: I only use "wifi connected" and "display wifi" as I dont want it to sync every x minutes, use data, nightmode etc.
[Android Apps and Games] Cyb0rgz:
This Script is good and Very curious to Try it. BTW, i would like to know whether is there any script to switch between GSM and WCDMA (3g/GSM)?

kindly Let me know how to switch between 3g and GSM. In My tasker Actions, this has been disabled. Any Help would be appreciated.

Thanks,

Cyb0rgz
[Android Apps and Games] sea2605:
I also tested your version: hugh battery drain by "wifistatemachine"-wakelock (see pic).

Please help anyone!

………………………………………………………………

My Xperia Z: bl unlocked, rooted .253, doomkernel v7, underclocked & -volted
[Android Apps and Games] parthipanramesh:
Are you using a Sony Xperia device? I read somewhere about this issue. I think it was in the Sony forums.

Thanks :) I'm using the built in option from Tasker but like you say it isn't compatible with every device. I googled for a plug in which could replace the option but I didn't find anything useful :/ I'll let you know when I find something useful :)

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] sea2605:
Sony xperia, exactly. Do you have a link (I searched for that thread but couldn't find it yet)

or do you know how they solved it?

I looked wether I have the rxbytes and txbytes files in sys/class/net/... They are all in their places, so they shouldn't be causing the issue.

EDIT:

Found the link to the sony forum:

http://talk.sonymobile.com/thread/49771?start=10&tstart=0

This wifistatemachine - Bug is also occurring on other Sony Xperias since at least 1 year ! And it wasn't solved by sony yet...

This wakelock occurs when you set wifi off during screen off ...and reduces my battery life ( minus 1,5 hours - screen on time) instead of increasing it...

………………………………………………………………

My Sony Xperia Z: bl unlocked, rooted .253, doomkernel v7, underclocked & -volted
[Android Apps and Games] parthipanramesh:
Ok so it seems to be a issue which I can't fix. Sorry! :/

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] avrojyoti:
Can anybody tell me how to apply these scripts ??

There's no proper instructions! :(
[Android Apps and Games] remidesroques:
Simply download the zip from the first page and use the prj.xml file. Put it in the project folder in tasker. Go to tasker and make sure you have the beginner mode off. Tap and hold the bottom bar and hit import.
[Android Apps and Games] avrojyoti:
I installed 'tasker' app ..there's a folder created in sdcard named 'tasker' but inside it there's no sub folder like 'tasker/project'...and i downloaded the zip...

Kindly plz elaborate.. :(
[Android Apps and Games] parthipanramesh:
Create a subdirectory called "project" and put the .prj file inside it. Then open Tasker and import that project. You need to turn off beginner mode. Then tap and hold the bottom bar. There you should see import.

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] avrojyoti:
where is the import option man? i can't find it... there are 4 tabs upside-profiles,tasks,scenes,variables and downside 'tick' 'cross' 'plus' and 'off' buttons.if i press menu key then appears 'browse profiles' 'preferences' 'data' 'info' and 'more'...

the question is where is the import button and how to browse through my mobile and on which tab ??? :(

and 'cell standby' has 3 folders in the zip 'profiles' 'projects' 'tasks'....so should i only put only the 'projects' folder(with .prj files inside) in tasker or all 3 of them :/
[Android Apps and Games] workdowg:
After you have gone into Tasker settings and unchecked the beginner mode option.... On the main screen you can now long press on the home icon in the lower left to reveal the import option.

Sent from my ASUS Transformer Pad TF700t - CROMi-X 4.6.4 ODEX
[Android Apps and Games] sea2605:
First go to the preferences (upper right corner), to the "ui" section and unselect "beginner mode".

Now go back to the normal startscreen of tasker (with back button) OR if you can't find that: close tasker and reopen it.

In the left corner (down) there is a house-symbol. Press on it for a while and a menu will appear. Select "import".

Find your imported files (no matter where they are) and open the only visible one: battery.xml (or whatever its called).

BUT...you could have googled that before asking for help (saves everyone's time, including yours).

Let me google that for you:

http://www.lmgtfy.com/?q=tasker+import+android

………………………………………………………………

My Xperia Z: bl unlocked, rooted .253, doomkernel v7, underclocked & -volted
[Android Apps and Games] avrojyoti:
thanks guys so much ...

now,faced another prob... ! when i select the 'Flight_Mode.prj.xml' it says error ..

screenshot attached..

---------------------

SONY XPERIA P-LOCKED BL-ROOTED

ROM : Enigma v4.4 (stock jb.400 based)
[Android Apps and Games] parthipanramesh:
Did you install Secure Settings?

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] avrojyoti:
thanks for helping though

i installed the newest version of TASKER and that problem is gone now !

but got an another prob which i think only the developer(you) of it can solve it !

i imported the project of cell standby...

but at the 'profiles' tab the 1st 2 xmls are getting an error type sign(like in the pic) and i think that is why when my signal is lost(when i'm in train or somewhere else) the flight mode is not getting activated ! :(((

Man,i'm done with it ! very much disappointed with myself and the phone itself ! :/

_______________________

SXP : Rooted with Locked BL

ROM : Enigma v4.4
[Android Apps and Games] parthipanramesh:
That's related to secure Settings. Install Secure Settings! You can download it in the Play Store. It's needed to turn airplane mode on or turn it off.

Btw I'm the dev :D

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] avrojyoti:
i got it working at last with your help :)

thanks a lot !! ^_^

waiting for many usable and great scripts \m/ keep it up (Y)
[Android Apps and Games] parthipanramesh:
Good! You're welcome dude! :) And thanks for using this scripts/projects.

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] hartej:
I'm intrigued by this part: "This wakelock occurs when you set wifi off during screen off ...and reduces my battery life ( minus 1,5 hours - screen on time) instead of increasing it..."

Could it solve your problem to put something like:

* Screen on

* Wait 1 second

* Wifi Off

* Wait 1 second

* Screen off

Instead of just Wifi off in the appropriate tasks? I've only just found this thread, but have an Xperia S myself so if I see this behavior I might have to give it a try!
[Android Apps and Games] sea2605:
nope, I also tested several periods: wifi off after 2 minutes of screen off. wifi off after 50 sec. Wifi off after 20 sec. And finally: immediately after screen off...

Didn't help. That wakelock always appeared after some time (sometimes only 0,5 h after reboot). Only turning "wifi off during screen off" off helped, no matter with which app I tried to turn it off. Right now I let stamina mode, wifi location and battery save mode of my xperia z turn wifi off...no such wakelock appears anylonger, but those can definitly never be as good as customized settings/tasks with tasker for example...

Edit:

wait, maybe I misunderstood you. Do you mean to turn off wifi 1 sec BEFORE turning the screen off? to accomplish that task, tasker should somehow be able to detect the startbutton or should somehow know since when the screen wasnt touched to turn wifi off 1 sec before the standby-mode turns the screen off...well we could test something like that to see if that helps!
[Android Apps and Games] chickentuna:
Hi, would just like to ask if it's ok to delete all the tasks/profile that involves turning Wifi ON/OFF without breaking any functions? Reason being I don't have a wifi at home and mainly use my phone to tether data(i have unlimited data that's why I don't need wifi)
[Android Apps and Games] parthipanramesh:
Yes you can delete them.

Sent from my Paranoid Nexus running AK Kernel
[Android Apps and Games] xcxa23:
hi, izit possible to set a rule, during locked screen, set min freq??

cos i usually look at the time/date but most of the time the cpu scale up to max

im using gn2
[Android Apps and Games] frwan:
The script is very useful thanks for it :good:
[Android Apps and Games] Kama45:
I'm listening to music, podcasts, and/or audiobooks for most of the work day. While my screen-on time is relatively low, I do frequently turn on my screen to change songs, rewind, check the time, etc. Can the high frequency of turning on and off Wi-Fi and data lead to worse battery life? Or are these operations negligible?
[Android Apps and Games] sea2605:
I also turn on the screen quite often...and like that the battery life gets worse. So i implemented "wait" for 10 sec before switching wifi on if screen is turned on...that helped. But all in all a process/wakelock called wifistatemachine ruins the battery life for me...no solution yet, therefore I dont use this script anylonger
[Android Apps and Games] parthipanramesh:
Add to the Screen of task the cpu action. (misc -> cpu)

Sent from my Paranoid Nexus running Fancy Kernel
[Android Apps and Games] parthipanramesh:
It can lead to worse battery life. I'd suggest you to add a wait command at the top of the data(display) and wifi(display) tasks. 1 minute or something like that.

Sent from my Paranoid Nexus running Fancy Kernel
[Android Apps and Games] Coniosoft:
Just bought Tasker and this thing looks overwhelming, in a good way. Thanks for the thread, after reading through it, I managed to set up a couple of profiles. Still tweaking them, though.