Related
I have a few questions.
I tried to make my own Juice Defender replacement:
Data Check -
Contexts:
Time
From 6:30
every 15 min
To 01:00
Power
Any
Inverted
Tasks:
Stop
if %SCREEN ~ ON
Stop
if %CELLSIG < 1
Mobile Data
On
Auto-Sync
On
Wait
2 min
Auto-Sync
Off
Mobile Data
Off
For some reason I can't set an end task, but I think I got around it. What this should do is when my screen is off and I have service it should check for any sort of notifications (facebook, mail), correct? Also, will I still get texts and calls instantly or does Mobile Data include these?
you shouldn't use the wait there as while tasker is waiting those 2 min nothing else can run.
I posted my tasks for this in another thread recently: http://forum.xda-developers.com/showpost.php?p=11097712&postcount=14
Is there anything else I can use instead of wait? I don't really want to make 4 profiles. Also I tried doing something else and it's not working. I attempted to make a Night Mode, however it doesn't turn on:
Nightenable:
Contexts:
From 1:00 Till 6:29
Tasks:
Variable Set %NIGHT, 1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Night Mode:
Contexts:
Variable Set %NIGHT, 1
Tasks:
Lower Volume, etc.
why don't you want to use 4 tasks? That's the most ellegant way to do it
for the night mode don't set the variable but set the stuff you want straight away
I would do it in one task except I also have this:
Power Mode:
Contexts:
Power On
Tasks: (Menu)
(Night Mode) Variable Set %NIGHT, 1
(Normal Mode) Variable Set %NIGHT, 0
Vulf said:
I have a few questions.
I tried to make my own Juice Defender replacement:
Data Check -
Contexts:
Time
From 6:30
every 15 min
To 01:00
...
...
For some reason I can't set an end task, but I think I got around it. What this should do is when my screen is off and I have service it should check for any sort of notifications (facebook, mail), correct? Also, will I still get texts and calls instantly or does Mobile Data include these?
Click to expand...
Click to collapse
How I do this:
Profile: Sleep
Time
From 23:00
un-checked
To 05:59
---------------------------------------
Tasks: Sleep
Notification Pulse
OffRinger Volume
5Mobile data
OffWiFi
OffBluetooth
OffAuto-Sync
OffDisplay Brightness
15---------------------------------------
Exit Tasks: Awake
Notification Pulse
OnRinger Volume
15Auto Brightness
On
I utilize a whole other Project with several Profiles to control the Wifi & Mobile Data usage. now working on a BT radio policy
Recently I decided to start using Juice Defender, but after two days of use, I figured I could do the same thing or better with Tasker. Personally, I was annoyed with the lack of a delay between turning my screen off and JD turning off my data. Sometimes I would turn off my screen for 10 seconds and see that the data was off (and my phone had yet to even lock). I had to reinstall Pandora after this because it would give me an error every time it loaded. The purpose of this post is to give other people ideas about how to replace Juice Defender, and to perhaps get ideas from others about how to improve upon this. These profiles will do two things:
1) Wait 4 minutes after my screen is turned off (I have it set to lock after 2 minutes of screen off) to turn off mobile data and auto-sync.
2) Wait 12 minutes after data/auto-sync are turned off to turn them back on for 1 minute and repeat this process every 12 minutes until phone is unlocked.
There are 3 profiles and each is linked to one task.
Profile: Screen Off (24)
Event: Display Off
Enter: Net Off (25)
A1: Wait [ MS:0 Seconds:0 Minutes:4 Hours:0 Days:0 ]
A2: Mobile Data [ Set: Off ] If [ %SCREEN ~ off ]
A3: Auto-Sync [ Set: Off ] If [ %SCREEN ~ off ]
A4: Variable Set [ Name:%DATA To: off Do Maths: Off Append: Off ] If [ %SCREEN ~ off ]
Profile: Screen On (26)
Event: Display Unlocked
Enter: Net On (29)
A1: Mobile Data [ Set: On ]
A2: Auto-Sync [ Set: On ]
A3: Variable Set [ Name:%DATA To: on Do Maths: Off Append: Off ]
A4: Stop [ With Error: Off Tasking ]
Profile: Ping (34)
Event: Variable Set [ Variable:%DATA Value: off ]
Enter: Ping (32)
A1: Wait [ MS:0 Seconds:0 Minutes:12 Hours:0 Days:0 ]
A2: Mobile Data [ Set: On ] If [ %DATA ~ off ]
A3: Auto-Sync [ Set: On ] If [ %DATA ~ off ]
A4: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ] If [ %DATA ~ off ]
A5: Mobile Data [ Set: Off ] If [ %DATA ~ off ]
A6: Auto-Sync [ Set: Off ] If [ %DATA ~ off ]
A7: Perform Task [ Nameing Stop: Off Priority:1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] If [ %DATA ~ off ]
I struggled with the "Ping" task for a while before coming to do it this way. The Ping profile will wait until the data is turned off, wait 12 minutes, then do a 1 minute ping, turning data and sync back on. This process will be repeated every 13 minutes and will be stopped only when I unlock my phone. However, I'm worried that it will keep my phone awake or end up taking more battery than necessary.
P.S. Obviously this doesn't take current network activity into consideration, but I figure that most things that I do in the background, I do on a charger. When running Pandora in my car, I keep my screen stay on and plug it in. When updating apps, I do so on Wifi. I may encounter apps that require me to change this profile, but until then, this is all I need.
EDIT: This latter context (Ping 2) does not appear to work now that I've tested it for weeks and looked at the logs. This could explain why the "Ping" context wakes your phone more often than "Ping 2". I'm leaving this so that maybe someone that is more informed can help me make it work.
I also thought of one other way to do this. I could use a Time-based profile as follows:
Profile: Ping 2 (36)
Event: Variable Set [ Variable:%DATA Value: off ]
Time: Every 10m
Enter: Ping 2 (32)
A1: Wait [ MS:0 Seconds:0 Minutes:5 Hours:0 Days:0 ]
A2: Mobile Data [ Set: On ] If [ %DATA ~ off ]
A3: Auto-Sync [ Set: On ] If [ %DATA ~ off ]
A4: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ] If [ %DATA ~ off ]
A5: Mobile Data [ Set: Off ] If [ %DATA ~ off ]
A6: Auto-Sync [ Set: Off ] If [ %DATA ~ off ]
Using this profile instead, the 1 minute "pings" would repeat every 10 minute starting 5 minutes after the data is first turned off. I will be testing this over the next couple of days, but unfortunately I lack experience using any battery-logging apps and will just be doing it by eye. Would anyone recommend one way over the other, or perhaps any other changes that I can make?
Click to expand...
Click to collapse
Thanks for sharing it, I have set the profile in tasker with ping time based, will share update by tomorrow
hoping for the best.
Thanks
Jitu
S3- Lord of the Phones.
What is the purpose of pinging periodically... just to check for new emails?
electricpete1 said:
What is the purpose of pinging periodically... just to check for new emails?
Click to expand...
Click to collapse
Yes, and any other things requiring an internet connection. Google Talk, Facebook, etc. Juice Defender has this very same functionality. That's where I got the idea.
So, I should mention that after a couple of days I've had a lot of success with the timer-based Ping task (Ping 2 listed above). The other (Ping 1) does seem to keep my phone awake more, but also works decently.
i have set for sync, every 5 hours, sync and data turns on and off to sync with google, and thats mostly it
Sent from my Desire HD using Tapatalk 2
XML file
TherynK said:
So, I should mention that after a couple of days I've had a lot of success with the timer-based Ping task (Ping 2 listed above). The other (Ping 1) does seem to keep my phone awake more, but also works decently.
Click to expand...
Click to collapse
Hi I tried to create profiles and task,,, but seems like it not running at all. Can u please share its XML file.
Thanks
Jitu
Thanks for this, I've just installed Tasker and this is the first thing I've tried. So far it looks to be working well - I have BetterBatteryStats installed and for the previous two days it was showing my battery consumption as being around 5-6% per hour. So far with this profile running in Tasker its down at 3% per hour so I'm happy
I've not got JuiceDefender installed so can't compare it with that just now but if I get a chance to I'll put it on (and then maybe GO Power Master) and see how they stack up. I prefer the idea of tasker though as it seems to be able to replace several apps in one.
Thanks
Thanks for sharing!! I'm trying out tasker and your profiles are my first... looking good!!
Nice trick, im going to try it!
I've noticed that my Ping 2 context does not trigger. Going back to trying the original Ping context.
im going to try it, sure it works great, thanks
I also recommend Llama
It can do almost everything that tasker (and obviously more things than JD) does and for free
Search it on Play store
I tested Tasker, JD, and Llama and i also find the last one more stable, so im using it actually
Enlight me...
Could you explain A7 from your Ping profile??
I'm new to Tasker, and I'm also trying to implement this save battery function.
TherynK said:
I've noticed that my Ping 2 context does not trigger. Going back to trying the original Ping context.
Click to expand...
Click to collapse
Is the original Ping context working for you?
Sent from my DROID RAZR HD using xda app-developers app
Thanks for sharing it
i am trying to do the ping 2 profile but i dont get how i do to insert the 10 mins in the profile,i can only add the variable event
any help?
Thanks!
Hi,
i've created tasker profile with this.
but i want to limit the profile to run only from certain time of the day (7:00 - 23:00), 23:00 - 7:00 no sync, no internet connection.
how do i set this up ?
I have a profile set up already to turn off all connection from 23:00 - 7:00, will my profile override the sync?
Thank you
TherynK said:
Recently I decided to start using Juice Defender, but after two days of use, I figured I could do the same thing or better with Tasker. Personally, I was annoyed with the lack of a delay between turning my screen off and JD turning off my data. Sometimes I would turn off my screen for 10 seconds and see that the data was off (and my phone had yet to even lock). I had to reinstall Pandora after this because it would give me an error every time it loaded. The purpose of this post is to give other people ideas about how to replace Juice Defender, and to perhaps get ideas from others about how to improve upon this. These profiles will do two things:
1) Wait 4 minutes after my screen is turned off (I have it set to lock after 2 minutes of screen off) to turn off mobile data and auto-sync.
2) Wait 12 minutes after data/auto-sync are turned off to turn them back on for 1 minute and repeat this process every 12 minutes until phone is unlocked.
There are 3 profiles and each is linked to one task.
Profile: Screen Off (24)
Event: Display Off
Enter: Net Off (25)
A1: Wait [ MS:0 Seconds:0 Minutes:4 Hours:0 Days:0 ]
A2: Mobile Data [ Set: Off ] If [ %SCREEN ~ off ]
A3: Auto-Sync [ Set: Off ] If [ %SCREEN ~ off ]
A4: Variable Set [ Name:%DATA To: off Do Maths: Off Append: Off ] If [ %SCREEN ~ off ]
Profile: Screen On (26)
Event: Display Unlocked
Enter: Net On (29)
A1: Mobile Data [ Set: On ]
A2: Auto-Sync [ Set: On ]
A3: Variable Set [ Name:%DATA To: on Do Maths: Off Append: Off ]
A4: Stop [ With Error: Off Tasking ]
Profile: Ping (34)
Event: Variable Set [ Variable:%DATA Value: off ]
Enter: Ping (32)
A1: Wait [ MS:0 Seconds:0 Minutes:12 Hours:0 Days:0 ]
A2: Mobile Data [ Set: On ] If [ %DATA ~ off ]
A3: Auto-Sync [ Set: On ] If [ %DATA ~ off ]
A4: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ] If [ %DATA ~ off ]
A5: Mobile Data [ Set: Off ] If [ %DATA ~ off ]
A6: Auto-Sync [ Set: Off ] If [ %DATA ~ off ]
A7: Perform Task [ Nameing Stop: Off Priority:1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] If [ %DATA ~ off ]
I struggled with the "Ping" task for a while before coming to do it this way. The Ping profile will wait until the data is turned off, wait 12 minutes, then do a 1 minute ping, turning data and sync back on. This process will be repeated every 13 minutes and will be stopped only when I unlock my phone. However, I'm worried that it will keep my phone awake or end up taking more battery than necessary.
P.S. Obviously this doesn't take current network activity into consideration, but I figure that most things that I do in the background, I do on a charger. When running Pandora in my car, I keep my screen stay on and plug it in. When updating apps, I do so on Wifi. I may encounter apps that require me to change this profile, but until then, this is all I need.
EDIT: This latter context (Ping 2) does not appear to work now that I've tested it for weeks and looked at the logs. This could explain why the "Ping" context wakes your phone more often than "Ping 2". I'm leaving this so that maybe someone that is more informed can help me make it work.
Click to expand...
Click to collapse
Is there any plugin or event to monitor the downloading speed of mobile data. The idea is to set a event trigger which triggers the "Net Off"-task if the download goes under certain threshold. For example if I set threshold as [50 KB/10 seconds] then the event is triggered soon the download speed goes under 50KB and for stays below continuously for more than 10 seconds.
I saw the above feature in Juice Defender Plus/Ultimate version. This cuts the data after all downloads is finished. In the profiles you shared it cuts the data after 4 mins even some download is going on. The another issue is data stays on for 4 mins even after it is not needed or all downloads are finished.
Hello TherynK,
This post really looks promising .. I have tried to build this profile but getting a little confused at the last step of the PING part. Is there a was to simplify that and would it be possible if you can post the profile download linke...
Thanks
Hi, I have been looking for a solution for this problem for quite a while myself, and today I found a way to collect the current value of data transferred and sent on all interfaces. Altho, I will not take credit for this part, nor will I bother to find the original poster, I will however share with you a more detailed explanation on how to set it up, and some ways to make use of it.
First off, this is what will happen
Situation 1. Headphones, Streaming with Spotify - When screen goes off, a variable with the current value of data transferred will be set, after 7 minutes an updated value will be set, we will get the difference between these two and thus get the amount of data transferred, if this is higher than a certain level, nothing will happen! (I.e spotify will continue to stream even tho screen is off)
The reason why I have used 7 minutes is this:Say you put on a song, it is 3 minutes long, after 30 seconds your screen goes off, the song is already downloaded when the traffic calculations will take place, using 7 minutes(or more), will in most cases lead to more than one song being played during the calculation, "ensuring" the capture of traffic data.
Situation 2. Headphones, No stream - Data will turn off after 7 minutes
Situation 3. No headphones, No Stream - Data will turn off after 2 minutes
Situation 4. No headphones, Stream - In my case, data will also turn off after 2 minutes(since this is not an issue for me) if you do however have issues with this, change the point A8 in section 2.2 below
In all cases: If the screen is turned On within the 7 or 2 minutes(depending on situation) the calculation will cancel! (i.e if you are surfing the web and screen goes black during a read)
1. Add some variables (I do not know if this is actually necessary!)
Open tasker, go to the variables tab on the top right corner and press the "+" button in order to add a variable, add these:
%CHEA 0
%CHEAB 0
%DIFF 0
%HEAD Off
2. Add some tasks (In the tasks tab)
-Make a new task called Checknet, press the options button(the screwdrivers) and set Collision handling to: Run both together, and keep device awake: on
Next is the list of what to do, this is not a script, add them one by one manually!
A1: Read Paragraph [ File: /proc/self/net/dev Para:1 To Var:%tet ]
A2: Variable Set [ Name:%newline To:
Do Mathsff 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 ]
2.1 Add another task and call it Chediff
A1: Add a Perform Task (Found under the Task section) and choose Checknet, make sure to set the "Return Value Variable" value to %CHEA
A2: Add a Wait and set it to 7 minutes (This can be tuned, however you will have issues if you set this too low, I will explain later)
A3: Add another Perform Task, choose Checknet again, and set the "Return Value Variable" to %CHEAB
A4: Add another Wait, I use 2 seconds (For some reason it calculates wrong without this)
A5:Add a Variable set - Set %DIFF to: (%CHEAB-%CHEA)/1000 (Select "Do Maths")
2.2 Add one last task, and call it Dispoff
A1: If %HEAD ~ On
A2: Perform task Chediff
A3: If %DIFF < 1000
A4: Mobile data off
A5: WiFi off
A6: End if
A7: Else
A8: Wait 2 minutes (You could use another "Chediff" (perhaps with a lower waiting walue? Would need to duplicate it tho), but personally I have no reason for it)
A9: Mobile data off
A10: WiFi off
A11: End if
3. Add some profiles
1. On state, hardware, Headset plugged (any) - Variable set %HEAD On
2. On state, hardware, Headset plugged (any) check the invert box - Variable set %HEAD Off
3. On event, Display On - Use 3x stop tasks to stop, Chediff, Dispoff and Chenet
4. On event, Display Off - Perform task "Dispoff"
Hmmm
Interesting...I have been trying to figure out a solution similar to this. In my case, I listen to a lot things not only via headphones but also through the speakers. I would like my wifi or 3g (depending on which one is connected) to stay on even if the app is in the background and or the screen is off. I think I may be able to tweak this to my needs...thank you....
EDIT: task A2 of Task 2, this doenst seem clear. What are we supposed to enter for in the Variable Set box?
Also A4, what is %tet set to? In the post it says %tet(3 but I dont think this is right
edit
I got the task to read the data values from the dev file. The original post was a bit confusing so here it is again with some notes that may help:
A1: Read Paragraph [ File: /proc/self/net/dev Para:1 To Var:%tet ]
A2: Variable Set [ Name:%newline To: Do Maths: Off Append: Off ] >> in order to have the Variable Set to blank you need to press Enter two times in the To box
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 ] >> enter a [space] in the Splitter box
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 ]
So I got this and the %DIFF task working. Now I am trying to write a profile to turn off wifi and 3g is the streaming data amount is low (i.e I am no longer streaming music or media).
A little help would be appreciated
I've been trying to make this work for a while, but my CHDIFF just doesnt seem to be doing its maths right,
For instance, onf the latest run i got CHEA 282554 and CHEB 289286, so (%CHEB-%CHEA)1000 should be like 6700/1000 = 6.7, right??
However the result shown on %DIFF is -221.962 for these numbers.... W-T-F??
EDIT: Okay, I think I got this to work (Thanks!), but the odd thing is that the CHECKNET is coming up with values (around 140,000) even when there is nothing downloading or when both WiFi and Data are turned off.... hmmm=?
Amazing!!
Thanks for this small "Tutorial". Everything works really fine!!
parthipanramesh said:
Thanks for this small "Tutorial". Everything works really fine!!
Click to expand...
Click to collapse
Yup, been using this for a while now. I love it!
Can you make a profile for wifi to switch off when the screen is off please? Dont need wifi to switch on when screen is on
ermacwins said:
Can you make a profile for wifi to switch off when the screen is off please? Dont need wifi to switch on when screen is on
Click to expand...
Click to collapse
oh thats easy..what I have is a delay of 30 secs after the screen turns off to see if the phone is turned back and an app that i designate as using Wifi is opened, if not then I turn off the wifi, otherwise I leave it on. I also have another profile checking to see if I have a streaming app running is, if so I will leave the wifi on. %streamapp is used in conjunction with the profile above to see if data is still being streamed.
Profile - wifi off
Context:
Event - display off
Variable - %streamapp ~ false
Tasks:
Wait 30 secs
If %display ~ on (I have another profile that checks the status of the display, on or off)
If %wifiapp ~ true (I have another profile that checks if an app I designate as needing wifi is running in the foreground)
Stop
End if
Else
Wifi off
End if
Screen off=wifi/data off if no stream or download active
Hey Guys,
I created a new thread: http://forum.xda-developers.com/showthread.php?t=2127481 to make it a little bit clear. Cz this is not my thread and I don't want to upset the thread owner.
I'd like to welcome you in my thread.
parthipanramesh said:
Context:
State - Display off
State - Wifi connected
Tasks:
Run task → Checkdiff (Create all the tasks from the first post!!)
If: %DIFF<1000
Wifi → off
End if
Stop → if %wifi~off
Goto Action 1
This profile will check if your streaming or downloading something and will only switch off wifi if you don't have traffic. If you have traffic it will run this task every 2 min until you don't have traffic. (Download/Streaming completed)
Click to expand...
Click to collapse
Hi
Can you please share your xml files?
I've tried to perform step by step but with no sucess....
Many thanks
toyjeep said:
Hi
Can you please share your xml files?
I've tried to perform step by step but with no sucess....
Many thanks
Click to expand...
Click to collapse
Hi toyjeep,
yes of course. I updated my post above yours and tweaked the tasks.
Have a look! Ask me if you have problems
Hope I helped you
parthipanramesh said:
Hi toyjeep,
yes of course. I updated my post above yours and tweaked the tasks.
Have a look! Ask me if you have problems
Hope I helped you
Click to expand...
Click to collapse
Thanks work almost perfect...
when task Screen off (wifi) runs it gives this error:
Variable convert: %CHECKA_WIFI: no value
Whats wrong??
BR
toyjeep said:
Thanks work almost perfect...
when task Screen off (wifi) runs it gives this error:
Variable convert: %CHECKA_WIFI: no value
Whats wrong??
BR
Click to expand...
Click to collapse
Click on the Screen off (wifi) task and press on Variable Convert: %CHECKA_WIFI. Look if it looks like this "Variable Convert: Name: %CHECKA_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKA_WIFI".
Did you use my xml file?
parthipanramesh said:
Click on the Screen off (wifi) task and press on Variable Convert: %CHECKA_WIFI. Look if it looks like this "Variable Convert: Name: %CHECKA_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKA_WIFI".
Did you use my xml file?
Click to expand...
Click to collapse
I had just imported your file
No messing around.....
---- edit -----
After anwser went to tab variable and it have a value now.
I think i'm understanding...
With WIFI off - If I go to task and "play", the value in variable goes to (none, empty)
With WIFI ON - It works well.
---------- Post added at 10:01 PM ---------- Previous post was at 09:52 PM ----------
Ok its working!
Testing with wifi off was the cause to the error.
Now I've tweaked a little the task SCREEN OFF
Screen off (4)
A1: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A2: If [ %SCREEN ~ on ]
A3: Goto [ Type:Action Number Number:1 Label: ]
A4: Else If [ %SCREEN ~ off ]
A5: Perform Task [ Name:Screen off (Data) Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A6: Perform Task [ Name:Screen off (Wifi) Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A7: Vibrate [ Time:200 ]
A8: End If
Now I have 10 seconds to turn on again the phone and dont lose the connection.
If the screen is on it goes in loop!
What do you think?
toyjeep said:
I had just imported your file
No messing around.....
---- edit -----
After anwser went to tab variable and it have a value now.
I think i'm understanding...
With WIFI off - If I go to task and "play", the value in variable goes to (none, empty)
With WIFI ON - It works well.
---------- Post added at 10:01 PM ---------- Previous post was at 09:52 PM ----------
Ok its working!
Testing with wifi off was the cause to the error.
Now I've tweaked a little the task SCREEN OFF
Screen off (4)
A1: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A2: If [ %SCREEN ~ on ]
A3: Goto [ Type:Action Number Number:1 Label: ]
A4: Else If [ %SCREEN ~ off ]
A5: Perform Task [ Name:Screen off (Data) Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A6: Perform Task [ Name:Screen off (Wifi) Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A7: Vibrate [ Time:200 ]
A8: End If
Now I have 10 seconds to turn on again the phone and dont lose the connection.
If the screen is on it goes in loop!
What do you think?
Click to expand...
Click to collapse
It's a good idea but this profile only runs if the screen is on You can set up an exit task which stops the Screen off task or which turns wifi on.
toyjeep said:
Thanks work almost perfect...
when task Screen off (wifi) runs it gives this error:
Variable convert: %CHECKA_WIFI: no value
Whats wrong??
BR
Click to expand...
Click to collapse
I have modified the script to get away that error
1.Name: Screen off (Wifi)
2.Run Shell: Command: cat sys/class/net/wlan0/statistics/rx_bytes ;Store Result In: %CHECKA_WIFI ;Continue Task After Error: yes
3.Variable Convert: Name: %CHECKA_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKA_WIFI
Add in 1: Variable Set: Name: %CHECKA_WIFI; To:0; If %CHECKA_WIFI !set
4.Wait: 30 seconds
5.Run Shell: Command: cat sys/class/net/wlan0/statistics/rx_bytes ;Store Result In: %CHECKB_WIFI ;Continue Task After Error: yes
6.Variable Convert: Name: %CHECKB_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKB_WIFI
Add in 2: Variable Set: Name: %CHECKB_WIFI; To:0; If %CHECKB_WIFI !set
7.Wait: 2 seconds (need to wait or it won't do the maths correctly)
8.Variable Set: Name: %DIFF_WIFI ;To: %CHECKB_WIFI-%CHECKA_WIFI ;Do Maths: yes
9.If: %DIFF_WIFI < 15
10.Mobile Data: off
11.Stop: Task: Screen off (Wifi)
12.Else:
13.Wait: 2 Minutes
14.Goto: Type Action Number ;Number: 1
15.End if
Basically if the CHECKA_WIFI and CHECKB_WIFI no value, it will set the value to 0
Any chance you could post the fixed/updated xml files? It would be ever so gracious.
wl3gan said:
I have modified the script to get away that error
1.Name: Screen off (Wifi)
2.Run Shell: Command: cat sys/class/net/wlan0/statistics/rx_bytes ;Store Result In: %CHECKA_WIFI ;Continue Task After Error: yes
3.Variable Convert: Name: %CHECKA_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKA_WIFI
Add in 1: Variable Set: Name: %CHECKA_WIFI; To:0; If %CHECKA_WIFI !set
4.Wait: 30 seconds
5.Run Shell: Command: cat sys/class/net/wlan0/statistics/rx_bytes ;Store Result In: %CHECKB_WIFI ;Continue Task After Error: yes
6.Variable Convert: Name: %CHECKB_WIFI ;Function: Bytes to Kilobytes ;Store Result In: %CHECKB_WIFI
Add in 2: Variable Set: Name: %CHECKB_WIFI; To:0; If %CHECKB_WIFI !set
7.Wait: 2 seconds (need to wait or it won't do the maths correctly)
8.Variable Set: Name: %DIFF_WIFI ;To: %CHECKB_WIFI-%CHECKA_WIFI ;Do Maths: yes
9.If: %DIFF_WIFI < 15
10.Mobile Data: off
11.Stop: Task: Screen off (Wifi)
12.Else:
13.Wait: 2 Minutes
14.Goto: Type Action Number ;Number: 1
15.End if
Basically if the CHECKA_WIFI and CHECKB_WIFI no value, it will set the value to 0
Click to expand...
Click to collapse
Hi,
The error persists
Screen off (Wifi) (12)
A1: Run Shell [ Command:cat sys/class/net/wlan0/statistics/rx_bytes Timeout (Seconds):0 Use Rootff Store Result In:%CHECKA_WIFI Continue Task After Errorn ]
A2: Variable Convert [ Name:%CHECKA_WIFI Function:Bytes to Kilobytes Store Result In:%CHECKA_WIFI ]
A3: Variable Set [ Name:%CHECKA_WIFI To:0 Do Mathsff Appendff ] If [ %CHECKA_WIFI ! Set ]
A4: Wait [ MS:0 Seconds:30 Minutes:0 Hours:0 Days:0 ]
A5: Run Shell [ Command:cat sys/class/net/wlan0/statistics/rx_bytes Timeout (Seconds):0 Use Rootff Store Result In:%CHECKB_WIFI Continue Task After Errorn ]
A6: Variable Convert [ Name:%CHECKB_WIFI Function:Bytes to Kilobytes Store Result In:%CHECKB_WIFI ]
A7: Variable Set [ Name:%CHECKB_WIFI To:0 Do Mathsff Appendff ] If [ %CHECKB_WIFI ! Set ]
A8: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A9: Variable Set [ Name:%DIFF_WIFI To:%CHECKB_WIFI-%CHECKA_WIFI Do Mathsn Appendff ]
A10: If [ %DIFF_WIFI < 15 ]
A11: WiFi [ Setff ] If [ %SCREEN ~ off ]
A12: Silent Mode [ Modeff ]
A13: Auto-Sync [ Setff ]
A14: Stop [ With Errorff Task:Screen off (Wifi) ] If [ %SCREEN ~ off ]
A15: Else
A16: Wait [ MS:0 Seconds:0 Minutes:2 Hours:0 Days:0 ]
A17: Goto [ Type:Action Number Number:1 Label: ]
A18: End If
A19: Vibrate Pattern X [ Pattern:100,100,100,100,100,100 ]
A20: Auto-Sync [ Setff ]
A21: Silent Mode [ Modeff ]
Is this ok??
What's your favorite Tasker profile?
Mine are
1. wifi auto off and on depending on which cell tower I'm connected to.
2.automatic screen shade depending on light sensor % bye bye screen filter.
3. media selection popup upon headphone plug in.
4.pocket mode phone screen off and vibrate on when phone put in to pocket headphone jack first.
Feel free to share ideas I just started using it my self and don't know much.
Here is a good read :
http://forum.xda-developers.com/showthread.php?t=1110775
Link to my tasker profiles: https://docs.google.com/folder/d/0B_iZBWQpaR0RLWM1SzItYVZPYWc/edit?usp=sharing
To import add profiles to sdcard/tasker/profiles
Then in tasker long press profiles tab and then import.
Sent from my SAMSUNG-SGH-I997 using xda app-developers app
Kind of hard to believe no one has any tasker profiles or ideas
Sent from my SAMSUNG-SGH-I997 using xda app-developers app
1. Silence notifications while I'm sleeping
2. Max volume & brightness when in car dock
3. Auto volume setting when plugging in headphones
It's always interesting to see what others are doing.
1. wifi auto off and on depending on which cell tower I'm connected to.
Click to expand...
Click to collapse
I have that, except, it only disconnects if %WIFI !~ connect*.... prevents dropouts due to intermittent tower signal when I’m connected.
Some other stuff I have:
Battery low warnings: vibrate/notify at 40%, audible/nofify at 30%, 20%, 10% (if silent is off).
Sync newsrob news reader at 3AM every morning (while I’m sleeping). Turns wifi on beforehand and off afterwards. This takes awhile... better to take care of it while I’m sleeping.
Turn on Display Rotation for Apps that needs it (my webbrowser, youtube, etc). On exit task Display rotation is turned off (saves battery to keep it off).
At 10:50AM every morning it pops up a message asking if I want to reboot. If I do not respond, nothing happens. I think it’s good to reboot every once in awhile for general principle and this is a time when I’m likely to have my phone on my desk at work, but not using it. Also reminds me it’s almost lunch time. Also if I tap the widget it sends another text and updates the value on the widget based on response.
At 11:00 AM every morning, it sends a text message to AT&T asking for my data usage for the month. Upon receipt of the message, it is parsed and the result is posted to a widget label on my home screen so I know how much I’ve used this month. Note that 11:00AM central time is a good check, other times of day the info you receive from AT&T may not be up to date.
When data is on I place a permanent notification to remind me that it is on. Notification goes away when data is turned off.
When screen goess off and not back on within a short period, I turn data off (to save data and battery) and turn display rotate off.
Battery % display widget in my dock – update every 5 minutes while screen is on. Color changes depending on level (green 75 – 100%, blue 50-75%, yellow 25-50%, red 0-25%. This also uses Zoom widgets (works nice with Tasker)
Screen Brightness level display in my dock. Tap to pull up menu to change brightness level and adjust mode between manual and auto (auto is also based on Tasker sensing light level). If brightness level is set above 40%, the displayed brightness number turns red and I get a perfmanent notification (so I don’t leave it on high). This also uses Zoom widgets.
Flaghlight widget. Tap to start flashlight. Then it asks me every 30 seconds if I want to leave flashlight on... if no response then it turns flashlight off (prevents forgetting and leaving it on).
Keyguard management. Turns on after a time delay whenever screen goes off away from home. Turns off keyguard whenever I enter key pattern (so I’m either at home in which case it’ll stay on after the first time I enter key pattern, or I’m on the road in which case it’ll turn back off when my screen goes off). Zoom widget has one letter H or A indicating whether my phone thinks I’m home or away (based on cell towers). Zoom widget has another letter H or A indicating how my keyguard is managed currently (home behavior or away behavior). Both letters change together, unless I tap the 2nd A while away to toggle it to H.. That indicates I have disabled keyguard on the road. A red permanent notification also appears. This is an original approach that I conceived/built although I drew ideas from the wiki
Profile which senses when I have a meeting on my calendar and automatically adjust my phone to “vibrate” mode so there will be no noises coming from my phone during meetings. By the way, I also forward all my incoming work emails to my Gmail account, which promptly stuffs them in a special folder. That way 1- I can quickly check incoming work emails from gmail 2 – all outlook meeting invites coming into my work email appear on my gmail calendar which is reflect in my phone calendar and triggers the profile. I actually don’t have a good working pre-meeting 10-minute reminder yet. Gmail’s doesn’t seem to work for me. Maybe I will do that in Tasker when I get a chance. This is a copy of someone else’s idea.
Every night before I go to sleep I press a button tell Tasker I’m going to sleep and in the morning when I get up I press another widget to tel Tasker I’m up. The sleep button sets Display Rotation off, sets wifi off, sets silent mode on, checks if I’m on charger and reminds me to put phone on charger. The awake button sets wifi on, sets silent mode off, syncs my google accounts (synker).
The wakeup task also sends a text message to google asking for weather in my hometown. Upon receipt of response, it populates a zoom widget on my homescreen with the weather/forecast. Also tapping that widget updates the forecast (via text). This is an original that I conceived/built.
For the weather widget and at&t data widget that both receive text messages... upon receipt of appropriate text message I use auto-shortcut to take me to the associated message. That way after I press a single back key, the incoming message notification is cleared. I could press back using built-in Tasker functions which would make it fully automatic, but that requires leaving USB debugging on, which makes me uneasy.
I have an “app” built in tasker that generates a transparent scene over everything else displaying battery level and temperature. Useful in the single situation that you are using navigation in the car and possibly charging.. keeping a close eye on battery level and temperature. This is an original that I conceived/built.
I also have a floating compass that floats over everything else. Useful with Navfree, whose display doesn’t give any clue which direction is north while navigating (the top of the map points in the direction you are traveling which may not be north). Requires SL4a and Python. This is an original that I conceived/built, with help from others on the Tasker google groups to figure out how to get the compass direction in Tasker
I have widgets to remember a parking space and launch Locus Pro to navigate back. Copied from somehwere.
I have profile to take/email photograph from front camera when someone enters the wrong unlock code. Copied from Android forums.
I have a profile to give a small tone whenever a call terminates. That is very helpful if you spend a lot of time on weak connections. You can keep talking after a call is dropped if you dont realize it. And knowing there will be a tone at end of call keeps you from asking "are you still there" during longer than normal pauses in the conversation. Copied from Android Forums. Very useful to me.
I have a widget that tells how many Tasker tasks are currently running. Tapping on it lists the tasks. Usually it doesn’t stay above zero for long. It allows me to recognize if a task has gone haywire. It complements nicely the display of active profiles which are listed in the pulldown notification. This is an original that I conceived/built.
electricpete1 said:
It's always interesting to see what others are doing.
I have that, except, it only disconnects if %WIFI !~ connect*.... prevents dropouts due to intermittent tower signal when I’m connected.
Some other stuff I have:
Battery low warnings: vibrate/notify at 40%, audible/nofify at 30%, 20%, 10% (if silent is off).
Sync newsrob news reader at 3AM every morning (while I’m sleeping). Turns wifi on beforehand and off afterwards. This takes awhile... better to take care of it while I’m sleeping.
Turn on Display Rotation for Apps that needs it (my webbrowser, youtube, etc). On exit task Display rotation is turned off (saves battery to keep it off).
At 10:50AM every morning it pops up a message asking if I want to reboot. If I do not respond, nothing happens. I think it’s good to reboot every once in awhile for general principle and this is a time when I’m likely to have my phone on my desk at work, but not using it. Also reminds me it’s almost lunch time. Also if I tap the widget it sends another text and updates the value on the widget based on response.
At 11:00 AM every morning, it sends a text message to AT&T asking for my data usage for the month. Upon receipt of the message, it is parsed and the result is posted to a widget label on my home screen so I know how much I’ve used this month. Note that 11:00AM central time is a good check, other times of day the info you receive from AT&T may not be up to date.
When data is on I place a permanent notification to remind me that it is on. Notification goes away when data is turned off.
When screen goess off and not back on within a short period, I turn data off (to save data and battery) and turn display rotate off.
Battery % display widget in my dock – update every 5 minutes while screen is on. Color changes depending on level (green 75 – 100%, blue 50-75%, yellow 25-50%, red 0-25%. This also uses Zoom widgets (works nice with Tasker)
Screen Brightness level display in my dock. Tap to pull up menu to change brightness level and adjust mode between manual and auto (auto is also based on Tasker sensing light level). If brightness level is set above 40%, the displayed brightness number turns red and I get a perfmanent notification (so I don’t leave it on high). This also uses Zoom widgets.
Flaghlight widget. Tap to start flashlight. Then it asks me every 30 seconds if I want to leave flashlight on... if no response then it turns flashlight off (prevents forgetting and leaving it on).
Keyguard management. Turns on after a time delay whenever screen goes off away from home. Turns off keyguard whenever I enter key pattern (so I’m either at home in which case it’ll stay on after the first time I enter key pattern, or I’m on the road in which case it’ll turn back off when my screen goes off). Zoom widget has one letter H or A indicating whether my phone thinks I’m home or away (based on cell towers). Zoom widget has another letter H or A indicating how my keyguard is managed currently (home behavior or away behavior). Both letters change together, unless I tap the 2nd A while away to toggle it to H.. That indicates I have disabled keyguard on the road. A red permanent notification also appears. This is an original approach that I conceived/built although I drew ideas from the wiki
Profile which senses when I have a meeting on my calendar and automatically adjust my phone to “vibrate” mode so there will be no noises coming from my phone during meetings. By the way, I also forward all my incoming work emails to my Gmail account, which promptly stuffs them in a special folder. That way 1- I can quickly check incoming work emails from gmail 2 – all outlook meeting invites coming into my work email appear on my gmail calendar which is reflect in my phone calendar and triggers the profile. I actually don’t have a good working pre-meeting 10-minute reminder yet. Gmail’s doesn’t seem to work for me. Maybe I will do that in Tasker when I get a chance. This is a copy of someone else’s idea.
Every night before I go to sleep I press a button tell Tasker I’m going to sleep and in the morning when I get up I press another widget to tel Tasker I’m up. The sleep button sets Display Rotation off, sets wifi off, sets silent mode on, checks if I’m on charger and reminds me to put phone on charger. The awake button sets wifi on, sets silent mode off, syncs my google accounts (synker).
The wakeup task also sends a text message to google asking for weather in my hometown. Upon receipt of response, it populates a zoom widget on my homescreen with the weather/forecast. Also tapping that widget updates the forecast (via text). This is an original that I conceived/built.
For the weather widget and at&t data widget that both receive text messages... upon receipt of appropriate text message I use auto-shortcut to take me to the associated message. That way after I press a single back key, the incoming message notification is cleared. I could press back using built-in Tasker functions which would make it fully automatic, but that requires leaving USB debugging on, which makes me uneasy.
I have an “app” built in tasker that generates a transparent scene over everything else displaying battery level and temperature. Useful in the single situation that you are using navigation in the car and possibly charging.. keeping a close eye on battery level and temperature. This is an original that I conceived/built.
I also have a floating compass that floats over everything else. Useful with Navfree, whose display doesn’t give any clue which direction is north while navigating (the top of the map points in the direction you are traveling which may not be north). Requires SL4a and Python. This is an original that I conceived/built, with help from others on the Tasker google groups to figure out how to get the compass direction in Tasker
I have widgets to remember a parking space and launch Locus Pro to navigate back. Copied from somehwere.
I have profile to take/email photograph from front camera when someone enters the wrong unlock code. Copied from Android forums.
I have a profile to give a small tone whenever a call terminates. That is very helpful if you spend a lot of time on weak connections. You can keep talking after a call is dropped if you dont realize it. And knowing there will be a tone at end of call keeps you from asking "are you still there" during longer than normal pauses in the conversation. Copied from Android Forums. Very useful to me.
I have a widget that tells how many Tasker tasks are currently running. Tapping on it lists the tasks. Usually it doesn’t stay above zero for long. It allows me to recognize if a task has gone haywire. It complements nicely the display of active profiles which are listed in the pulldown notification. This is an original that I conceived/built.
Click to expand...
Click to collapse
All I can say is wow
Would you mind exporting your profiles for download
Sent from my SGH-I997 using xda app-developers app
Thanks. Exporting can be a little tricky for a variety of reasons. We have choice of two formats: human-readible text (which can't import into tasker) and tasker-readable xml (which resembles gibberish to humans). And what I've described encompasses a large number of profiles, tasks, and scenes. Could export a project tab on a few if you'd like. Sometimes importing a project tab causes bizarre conflict of same-named scenes ... at least I've had that experience.
So, if you could identify one or two that you're interested in, I can work on exporting/presenting those.
Meantime, some stuff I've already organized (?) for presentation:
1 - A rambling youtube video. First five minutes is sort of beginners guide to tasker using screen-off / data off profile as example. Next 4 minutes is rambling wander through some of my profiles. Last minute for some reason I decided to show off my holo launcher dock widgets. I did not yet have my tasker/zoom-based widgets for battery% and screen brightness in place yet at the time I made that video.
http://www.youtube.com/watch?v=il5EAKkMgGI
2 - Floating battery monitor (% and temp) - intended to float over top of navigation program while navigating/charging
http://forum.xda-developers.com/showthread.php?t=1890710
By the way I have a new version of that, just haven't posted it there yet. Maybe a good job for someday.
Some general philsophy about Tasker fwiw: A lot of the things I do with tasker can be done with other programs/widgets. But I tend to think it's more efficient to minimize the number of programs in the category of widgets (which is continuously running process) and things that monitor for chage in state. They all use resources. Tasker uses resources as well but if we only use Tasker and Zoom for these types of things I think it's better. And sot of fun (that's probably the real reason). I'd have to say not more efficient in terms of time. For anyone considering buying Tasker I would mention it's not likely you're just going to grab a bunch of profiles and have them easily imported/running. There are often tweaks needed based on phone type and interaction among the various profiles.
Great video
Sent from my SGH-I997 using xda app-developers app
Notification/Ringer Volumes
I just recently picked up a Verizon S4, and I'm trying to figure out how to make tasker "link" my notification volume with my ringer volume, so they will both change using the rocker. Any help?
---------- Post added at 07:42 PM ---------- Previous post was at 07:30 PM ----------
Xxw0lfxX said:
I just recently picked up a Verizon S4, and I'm trying to figure out how to make tasker "link" my notification volume with my ringer volume, so they will both change using the rocker. Any help?
Click to expand...
Click to collapse
Sorry, I wrote this question in the wrong device thread. I didn't notice that when replying from my mobile browser
Sent from my Verizon Wireless Galaxy S4 using Tapatalk 4 beta.
1) I have created a profile that whenever i am sleeping phone goes in smart slient mode, if some vip numbers call my phone is back in ringer mode.
2) during some duration of the day my phone speaks the name of the caller instead of ringing. if not a known caller than it rings.
3) integrated it with LMT launcher and made a profile like double swipe up and all volumes are at max. double swipe down all are at minimum.
4) wave your phone and it takes a screenshot. ( you can change the context to any thing.)
5) if i missed a particular number 5 times in continuity than send him a custom message.
6) Phone says "missed call" at regular interval e.g 30 min
7) Phone says "battery full" when charged, battery low alert when below 20%.
8) Phone says "AC/USB Charging" when plugged in AC and USB respectively. and at removal is says AC|USB removed.
That sounds like a pretty neat setup you have there
Sent from my Verizon Wireless Galaxy S4 using Tapatalk 4 beta.
Inspirational quotes on home screen
I made a tasker profile to show inspirational quotes every hour on home screen.
For this I made a text file containing more than 100 quotes, each seperated by "/" for seperating and identifying an individual quote.
Then picking up any quote randomly and pushing it to "Minimalistic Text" tasker plugin.
For displaying on screen I used "Minimalistic Text".
Profile:
Profile: Insp Quotes
State: Battery Level [ From:20 To:100 ]
Time: From 06:35 Till 22:35
Enter: Insp Quotes // This is the task
Task: Insp Quotes
A1: Perform Task [ Name:Inspiration Stopff Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A2: Wait [ MS:0 Seconds:0 Minutes:0 Hours:1 Days:0 ]
A3: Goto [ Type:Action Number Number:1 Label: ]
Task: Inspiration
A1: Read File [ File:/sdcard/Download/insp.txt To Var:%Insptext ]
A2: Variable Split [ Name:%Insptext Splitter:/ Delete Baseff ]
A3: Variable Set [ Name:%Insprandom To:%Insptext(#) Do Mathsff Appendff ]
A4: Variable Randomize [ Name:%Insptextno Min:1 Max:%Insprandom ]
A5: Variable Set [ Name:%Inspsugg To:%Insptext(%Insptextno) Do Mathsff Appendff ]
A6: Minimalistic Text [ Configuration:insp = %Inspsugg Package:de.devmil.minimaltext Name:Minimalistic Text ]
I hope you will like the idea
Thanks
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
rahul70236 said:
1) I have created a profile that whenever i am sleeping phone goes in smart slient mode, if some vip numbers call my phone is back in ringer mode.
2) during some duration of the day my phone speaks the name of the caller instead of ringing. if not a known caller than it rings.
3) integrated it with LMT launcher and made a profile like double swipe up and all volumes are at max. double swipe down all are at minimum.
4) wave your phone and it takes a screenshot. ( you can change the context to any thing.)
5) if i missed a particular number 5 times in continuity than send him a custom message.
6) Phone says "missed call" at regular interval e.g 30 min
7) Phone says "battery full" when charged, battery low alert when below 20%.
8) Phone says "AC/USB Charging" when plugged in AC and USB respectively. and at removal is says AC|USB removed.
Click to expand...
Click to collapse
Hey,
Some of your profiles soun pretty awesome, is asking too much, for you to export them and share?
Thank you
need some help seeting up car profiles pls!
Hello, need some help setting up the following actions in Tasker. I use a tablet (Android 4.0.4) only for in car use and have some problems setting tasker profiles. It should be something like this:
For state power on (charging any) do the following tasks:
1. Disable keyguard
2. Issue a play command to the media app, only if music is not playing already (will come back why I need this latter on) - now I'm using Media Utilities plugin with Smart play (which should do that but it doesn't ... sometimes it sends the play even if the music is already playing, or will send the play command to the built-in media player instead to JetAudio which is the default set media player in android and in media utilities)
3. Turn GPS on, using now secure settings plugin - works great
4. Turn Bluetooth on - works
For State Power off (not charging any) do the following:
1. Turn keyguard on (enable)
2. Wait 12 seconds
3. IF keyguard on >>>
3.1 Stop media (using tasker built in media actions)
3.2 Disable GPS (secure settings plugin)
3.3 Disable bluetooth
3.4 System Lock
4 END IF
Everything works just great UNTIL ... I go in the car, turn the ignition ON ... the power ON profile starts than when I crank the engine, the car cuts the power to any accesories including car phone charger. The power off profile starts and waits 12 seconds before stoping music, gps, etc.
Than the car starts (before those 12 seconds run up) and the phone charger receives power, and the power on profile comes back. I have a higher priority for the power on profile so, the power off profile is aborted and the power on starts again ... but here the problems start: Either the music is stopped (because another play is issued from the power on profile, and the media app thinks it's pause even with smart play command from media utilities) or the default android player is started and the jet audio it's stopped because the play command is send to the build in media player app.
what I would like is
- a shure tested way for tasker to check if any media it's being played, and if it is, abort the play command (tried %MTRACK with flash but could not set it up to work, got the same problems as above)
- some other ideas how to hack, workaround, create a better flow in my profiles to avoid interruptions in those 10-15 seconds while the tablet's charger is cut off by the car, when the car;s engine starts up.
thank you
I am trying to keep my new Galaxy S7 unrooted for a variety of reasons.
I have searched high and low for some clever way to turn on/off the cell radio under automated control such as with Tasker, without root. Is it really not possible?
My need for this is threefold. I use voip when I am on WiFi and have no need for any cellular access during those times.
1) My home is in a cell dead zone and turning off the cell radio saves battery
2) I get "double" incoming calls - once over voip and again over the cell network
3) I am more exposed to spam calls when I am on the cellular network. This is because all legitimate calls come in via google voice, which has good spam control, but when I'm on the cell network spammers also reach me by dialing my cell phone's native number, which is unprotected from spam.
Needless to say, I know how to turn off the cell network manually (indirectly by going into airplane mode, then re-enabling wifi). I want to automate this switching.
Ideas appreciated!
Unfortunately nothing to do about that without root since Jellybean 4.2...
Somebody has created complicated ways to turn airplane mode on/off using macro recording for simulating the required physical screen touches.
johnpane said:
I am trying to keep my new Galaxy S7 unrooted for a variety of reasons.
I have searched high and low for some clever way to turn on/off the cell radio under automated control such as with Tasker, without root. Is it really not possible?
My need for this is threefold. I use voip when I am on WiFi and have no need for any cellular access during those times.
1) My home is in a cell dead zone and turning off the cell radio saves battery
2) I get "double" incoming calls - once over voip and again over the cell network
3) I am more exposed to spam calls when I am on the cellular network. This is because all legitimate calls come in via google voice, which has good spam control, but when I'm on the cell network spammers also reach me by dialing my cell phone's native number, which is unprotected from spam.
Needless to say, I know how to turn off the cell network manually (indirectly by going into airplane mode, then re-enabling wifi). I want to automate this switching.
Ideas appreciated!
Click to expand...
Click to collapse
This really isn't that complicated. Like the previous poster suggested, this can be accomplished/automated by simulating input. I use Tasker + AutoInput to enter flight mode every night and exit it every morning. Oh, and to click away that horrid volume warning pop-up too.
Google around and search XDA, there are multiple threads on the subject.
Fruktsallad said:
This really isn't that complicated. Like the previous poster suggested, this can be accomplished/automated by simulating input. I use Tasker + AutoInput to enter flight mode every night and exit it every morning. Oh, and to click away that horrid volume warning pop-up too.
Click to expand...
Click to collapse
Thank you for the suggestion to use AutoInput. AutoInput is a very nice tool, but not a very good solution for the need I described. AutoInput cannot work if the screen is locked. It will also be very disruptive if I am doing an interactive task on the phone at the time the action is triggered, which is likely to occur because the automation would be triggered any time I enter or leave a WiFi network. On my previous (rooted) device, I had this set up to all occur in the background, whether the phone was locked or I was using it - fast and transparent.
I am surprised that the system has become so locked down that manipulating airplane mode and related features cannot be automated any other way than the through simulating user input. If the user is allowed to do it, why have the developers decided not to let the user grant permission to an app to do it?
johnpane said:
Thank you for the suggestion to use AutoInput. AutoInput is a very nice tool, but not a very good solution for the need I described. AutoInput cannot work if the screen is locked. It will also be very disruptive if I am doing an interactive task on the phone at the time the action is triggered, which is likely to occur because the automation would be triggered any time I enter or leave a WiFi network. On my previous (rooted) device, I had this set up to all occur in the background, whether the phone was locked or I was using it - fast and transparent.
I am surprised that the system has become so locked down that manipulating airplane mode and related features cannot be automated any other way than the through simulating user input. If the user is allowed to do it, why have the developers decided not to let the user grant permission to an app to do it?
Click to expand...
Click to collapse
Why they chose to restrict airplane mode permissions is beyond me. A really stupid move imho.
However, I see no problem providing conditions in Tasker so that it the task only triggers when you're not actively using the phone for instance. It can then turn on the screen for the second or two that's needed for pressing the buttons.
Fruktsallad said:
However, I see no problem providing conditions in Tasker so that it the task only triggers when you're not actively using the phone
Click to expand...
Click to collapse
I repeat, "AutoInput cannot work if the screen is locked."
An automatic task is useless if it only works when I have the screen unlocked but am not using the device. That is practically never.
johnpane said:
I repeat, "AutoInput cannot work if the screen is locked."
Click to expand...
Click to collapse
Repeating it doesn't make it any less incorrect.
I'm using AutoInput just fine with the screen locked. Fingerprint security always active. I lock my phone and put it on the charger each night. The task is triggered, secure settings wakes the screen for a few seconds while AutoInput does it magic.
It just works.
Hmm, I have tested exactly what you describe, including waking the screen with Secure Settings. On my Galaxy S7 running Android 6.0.1., AutoInput is not able to change Airplane Mode when the screen is locked with fingerprint security.
EDIT: Yes, I see that it can work. I had to change from using the Airplane Mode Settings to using the Quick Settings. Thank you for your help!
johnpane said:
Hmm, I have tested exactly what you describe, including waking the screen with Secure Settings. On my Galaxy S7 running Android 6.0.1., AutoInput is not able to change Airplane Mode when the screen is locked with fingerprint security.
EDIT: Yes, I see that it can work. I had to change from using the Airplane Mode Settings to using the Quick Settings. Thank you for your help!
Click to expand...
Click to collapse
Hi John, its been some time from this post but, would you mind sharing how you manage to get Autoinput work while the phone is locked? I have been trying with no success, the task I have performs just fine by hitting play in tasker
It worked on Marshmallow, but since the upgrade to Nougat it no longer works. I have it set up to wait for the screen to be unlocked before trying to run the rest of the script.
johnpane said:
It worked on Marshmallow, but since the upgrade to Nougat it no longer works. I have it set up to wait for the screen to be unlocked before trying to run the rest of the script.
Click to expand...
Click to collapse
Thanks for your quick reply
I still have marshmallow, how can I do it to make it work
cheers
Here are the relevant excerpts from my (marshmallow) scripts. %JPDISP is a variable I maintained whether the screen is on (unlocked or not).
Turn cell off v6 (6)
A7: Secure Settings [ Configuration:CPU Awake Only 3 Seconds Timeout (Seconds):0 Continue Task After Errorn ] If [ %JPDISP ~ 0 ]
A8: AutoInput Global Action [ Configuration:Action: Quick Settings Timeout (Seconds):3 Continue Task After Errorn ] If [ %JPDISP ~ 1 ]
A9: Wait [ MS:50 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A10: AutoInput Action [ Configuration:Type: Text
Value: Airplane mode
Action : Click
Is Tasker Action: true
Check Screen State: false Timeout (Seconds):3 Continue Task After Errorn ] If [ %AIR ~ off ]
A11: Wait [ MS:50 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A12: AutoInput Action [ Configuration:Type: Text
Value: TURN ON
Nearby Text: CANCEL
Action : Click
Is Tasker Action: true
Check Screen State: false Timeout (Seconds):3 Continue Task After Errorn ] If [ %AIR ~ off ]
A13: Close System Dialogs
A14: Variable Set [ Name:%JPTIMEOUT To:%qtime+15 Recurse Variablesff Do Mathsn Appendff ]
A15: Wait Until [ MS:200 Seconds:0 Minutes:0 Hours:0 Days:0 ] If [ %AIR ~ on | %qtime > %JPTIMEOUT ]
A16: Goto [ Type:Action Number Number:7 Label: ] If [ %AIR ~ off ]
A17: Bluetooth [ Setn ] If [ %BLUE ~ off ]
A18: Secure Settings [ Configuration:Wifi Enabled Timeout (Seconds):0 Continue Task After Errorn ] If [ %WIFI ~ off ]
A19: Variable Set [ Name:%JPTIMEOUT To:%qtime+15 Recurse Variablesff Do Mathsn Appendff ]
A20: Wait Until [ MS:200 Seconds:0 Minutes:0 Hours:0 Days:0 ] If [ %WIFI ~ on | %qtime > %JPTIMEOUT ]
A21: Goto [ Type:Action Number Number:18 Label: ] If [ %WIFI ~ off ]
A22: Variable Set [ Name:%JPTIMEOUT To:%qtime+15 Recurse Variablesff Do Mathsn Appendff ]
Turn cell on v5 (22)
A4: Secure Settings [ Configuration:CPU Awake Only 3 Seconds Timeout (Seconds):0 ]
A5: AutoInput Global Action [ Configuration:Action: Quick Settings Timeout (Seconds):3 Continue Task After Errorn ]
A6: Wait [ MS:50 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A7: AutoInput Action [ Configuration:Type: Text
Value: Airplane Mode
Nearby Text: NFC
Action : Click
Is Tasker Action: true
Check Screen State: false Timeout (Seconds):3 Continue Task After Errorn ] If [ %AIR ~ on ]
A8: Close System Dialogs
OMG why do they make it so hard to do this? Is it so these companies can continue to track everything we do? That is the only reason I can see them making it hard to accomplish this without a root or 2-3 apps with optimal settings (it's hard enough to get my LED indicator to work properly without a 3rd party app).