Is there a way
> to prevent this from happening - to reduce the time buffer between motion events to practically nothing and to set a little delay when the phone moves into the next orientation before that action - keeping the screen on - is triggered?
It would be best if you could post all relevant profile and task descriptions.
To post your profile or task here... Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)
Any linked tasks will be exported with the profile they are linked to..
To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name. Tasker will list your profile with the context name if you have not given it one).
- the problem is there is so much motion that the events seem to carry through to the next orientation
You should be able to figure out why this is happening from the run log. Menu / more / run log.
Are you using the %PACTIVE (profiles active) and the profiles active contexts?
Have you viewed the run log to see where the conflict could be?
I do have some suggestions but its getting late, I will have to reply tomorow.....
- and I needed some project to inspire me to
> learn the basic features of Tasker which it has.
Well..? It appears you certainly can understand the actions and the logic for the actions however the way you designed this along with a few of your comments lead me to believe your understanding of relationship of profiles and tasks as well the difference in a state and event context could be improved.
I would start with something a bit more basic then once you have a full understanding of how it works you should be able to make this project work.
This cannot be explained in one post and I am not sure of your level of understanding so I will just start with the basics.
Profile: screen time out
Context: state/ power on: any
Task: set time out
1. Set time out tom10 min
It is best to think of a task as it own separate entity. It is simply a grouping of actions. There are many ways to start a task IE profile, from another task with a 'prefrom task action', a home screen short cut, a scene.. ect.. once a task has started has been started it runs independent from whatever started it (for the most part) and once the task has finished its actions. Example: set screen time out to 10 min) it will not run again until it is started again. So your screen time out can now be changed by another task or manually. And even though the profile that started the task is still active it will not prevent or reset the screen time out to 10 min.
Sorry a bit short on time this morning, I will post more when I get a chance.
> Thanks for your patience. Perhaps I should not give up so easily. While you were sleeping I carefully read the basic tutorials explaining profiles, contexts (states and events), tasks, actions, variables and projects. As you have pointed out my terminology was a bit rough, but on retrospect most the application of the principles was okay (I think)
Correct..
- because many parts of the screen project do work as they should. The screen project looks complicated but its really a lot of basic profiles put together.
Correct. It is how these profiles and tasks are colliding that is most of the issue I believe.
I am not sure how I am going to find out what's causing the glitches though if the log is not giving the correct information.
I would highly doubt the log is incorrect. My guess is you are misinterpreting it.
> If I am going to get serious about Tasker I do need to get more familiar with contexts and variables. I am going to have to find some other useful Tasker projects but my life is so simple that I am a bit stumped as to what these might be.
Oh don't worry... those will come as soon as you see how much Tasker can actually do... :)
>
Again, not much time just now but one example would be you have 3 of your motion event profiles firing three separate tasks that do the same thing. You can link all of these profile to the same task. Then you can set what will happen if the task is still running and another profile tries to start it again, in the task collision settings. If you are in the task edit screen it is the three button slider icon in the lower right for task properties.
One more suggestion to get you going would be to try to this with one task. So whenever profile goes active (state) or fires (event) it will start this one task. Then within the task use the %PACTIVE variable to test which profiles are currently active and decide what to set from that information. %PACTIVE will only be good for the state context but I believe all of your event contexts were all doing the same thing within the task so it should not matter. If you do find the need to know what event context has fired the task (from within the task) this information is in the array %caller.
If you want to find info on such things as %caller from the guide the best way is to use the menu / 'search Tasker' option
On Apr 6, 2016 8:57 AM, ricp...@gmail.com wrote:
>
>
> One more suggestion to get you going would be to try to this with one task.
The advantage to this is you only have one task running, not 10 different tasks all stepping on each other. ..
> Now I will have to re-think this but as you have suggested minimize the tasks to avoid conflict.
With root you could just emulate a screen tap in a unused part of the screen. I think I used 1x1 before with no issues.
Without root I would suggest staying with your approach and just toggle the time,
-Variable add %Toggle +1 wrap around 2
- set time out to 15 : if %Toggle = 0
- set time out to 16 : if %Toggle =1
> I've made a profile -
It is always best to post your exported profile description
To post your profile or task here... Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)
Any linked tasks will be exported with the profile they are linked to..
To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name. Tasker will list your profile with the context name if you have not given it one).
> Context event - shake Left Right
>
No other profiles running. The screen still times out. I've used 15s and 30s since these are settings on my phone - same result. It may be an MIUI rom compatibility issue?
Strange, I have tested this and it does work on my device.
I have a rooted Motorola Droid 4 / Stock ROM / Tasker / Version: 4.8m / Android version 4.1.2
Did do check the run log?
Did you de-select the 'restore settings' option for the profile?
You will see the settings being restored in the run log as a system task that has a negative ID number.
>
> The root method I've not grasped. Thanks for the input.
>
> --
Use a action / code / run shell
command: input tap 1 1
Your project intrigued me so I made one.. :)
Here is my version. It has some debug stuff in that should be apparent. You can open your notify bar and watch as the different phases are implemented.
When you download you just need to make sure the file ends up in
/storage/sdcard0/Tasker/projects/
Then you can import it by long pressing any project tab.
Profile: Prox Swipe (762)
State: Proximity Sensor
Enter: Motion On (756)
Abort Existing Task
Profile: Face Up (755)
Restore: no
State: Orientation [ Is:Face Up ]
Enter: Motion On (756)
Abort Existing Task
Profile: Face Down (758)
Restore: no
State: Orientation [ Is:Face Down ]
Enter: Motion On (756)
Abort Existing Task
Profile: Power (759)
Restore: no
State: Power [ Source:Any ]
Enter: Motion On (756)
Abort Existing Task
Profile: Moving Face Up (757)
Event: Shake [ Axis:Left-Right Sensitivity:Very High Duration:Medium ]
State: Orientation [ Is:Face Up ]
Enter: Motion On (756)
Abort Existing Task
Profile: Moving Face Up (760)
Event: Shake [ Axis:Up-Down Sensitivity:Very High Duration:Medium ]
State: Orientation [ Is:Face Up ]
Enter: Motion On (756)
Abort Existing Task
Profile: Moving Face Up (761)
Event: Shake [ Axis:Backwards-Forwards Sensitivity:Very High Duration:Medium ]
State: Orientation [ Is:Face Up ]
Enter: Motion On (756)
Abort Existing Task
Motion On (756)
Abort Existing Task
<face up and moving>
A1: Anchor
A2: If [ %caller() ~ *Moving Face Up* ]
A3: Variable Add [ Name:%Mot_toggle Value:1 Wrap Around:2 ]
A4: Display Timeout [ Secs:15 Mins:0 Hours:0 ] If [ %Mot_toggle ~ 1 ]
A5: Display Timeout [ Secs:16 Mins:0 Hours:0 ] If [ %Mot_toggle ~ 0 ]
A6: Notify [ Title:Face Up Text:Face up loop on 15
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
A7: [X] Flash [ Text:%caller() Long:On ]
A8: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A9: End If
<prox swipe>
A10: Anchor
A11: If [ %caller() ~ *Prox Swipe* ]
A12: Display Timeout [ Secs:0 Mins:59 Hours:0 ]
A13: Notify [ Title:Face Up Text:Prox swipe
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
A14: Stop [ With Error:Off Task: ]
A15: End If
<face up power on>
A16: Anchor
A17: If [ %PACTIVE ~ *,Face Up,* & %PACTIVE ~ *,Power,* ]
A18: Display Timeout [ Secs:0 Mins:59 Hours:0 ]
A19: Notify [ Title:Face Up Text:Face up and power
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
A20: Stop [ With Error:Off Task: ]
A21: End If
<face up>
A22: Anchor
A23: If [ %PACTIVE ~ *,Face Up,* ]
A24: Display Timeout [ Secs:15 Mins:0 Hours:0 ]
A25: Say [ Text:Face up shutting off Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A26: Notify [ Title:Face Up Text:Face up no activity shut off
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
A27: Stop [ With Error:Off Task: ]
A28: End If
<face down>
A29: Anchor
A30: If [ %PACTIVE ~ *,Face Down,* ]
A31: Display Timeout [ Secs:0 Mins:59 Hours:0 ] If [ %Mot_toggle ~ 0 ]
A32: Say [ Text:Face down shutting off Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A33: Notify [ Title:Face Up Text:Face down set to 15
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
A34: End If
<any other position>
A35: Anchor
A36: Display Timeout [ Secs:0 Mins:59 Hours:0 ]
A37: Notify [ Title:Face Up Text:Any other
%DTOUT Icon:null Number:0 Permanent:Off Priority:3 ]
Let me know if you have any questions..
Not sure why it printed that way, this should be easier to read..
And I realized I did not de-select 'restore settings' for the Prox Swipe profile. You should do this..
Task: Motion On (756)
> I tested yours, de-selected 'restore settings' for the Prox Swipe profile - checked the log to confirm that the profile was being triggered (it was every second or so) and it still times out. Maybe a conflict with the MIUI rom? Yet the Gravity Screen App works like a charm.
>
> Not sure if it's worth rooting to make it work. I have rooted before
>
Oh, I thought you need root to get a custom ROM?
Is that a custom ROM?
We must be missing a non rooted way to keep the screen awake. Perhaps it can be done with a java function? You could try googling for a java solution.
> No its an Mi note 3 - it came with that ROM. Um - the java solution - I'm not a programmer ;)
Nor am I. :(
I did some googling. It appears a java solution "might work".
android:keepScreenOn="true"
However I do not know java and it would most likely take some time for me to get that to work.
The plug in 'secure settings' will do this without root. I believe it is a free app and you need to install its helper app as well.
> I actually have the plug in already - just didn't get round to trying it. But perhaps the rooted method might work better. Using Kingroot is a pretty painless way to root.
If I recall correctly secure settings does work fine but if you do root - -I know the input tap will work. No guarantees on finding a place on the screen to tap that will not affect any app. I do remember using 1 1 and not having a issue.