> I would prefer if one of the profiles were ALREADY active, it would just reset the 20 second timer to 0. And NOT press the notification button one more time.
>
> I hope this makes sense, and I think it can be done, I'm just not sure how.
do you have the 'always start new copy' 'not' selected in the launch app action? that should avoid the glitch.
otherwise..
It sounds like you would want to check and see if the ' live view' is still running and if so then do not restart it. You can do this by making a profile with a context of 'Application / "app name" and select the services option. then within your task check to see if that profile is active with a
IF %PACTIVE matches *,name of profile,*
the *,,* are important. see pattern matching in the guide.
Tasker needs to be selected in your Android accessibility settings for the app context to work.
If you need more help please include all relevant exported task and profile 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).
On second thought... it sounds like if live view is running then it is in the foreground. If this is the case then it will most likely have unique window value.
Enable tasker in your android accessibility settings and test the value of the variable %WIN when live view is running. You should be able to test for that value from within your task to see if it is running in the foreground.
> I dont think I can use "always start new copy" as I'm not launching an app in Tasker. I'm pressing the notification I get, using Auto Notification, and that opens the app yes, but I dont think that gives me the possibility to use "always start new copy".
Correct, I should have seen that..
>
> But I think something of what you wrote would work.
> I'm not trying this
>
> Task "Skybell Pushed" (is triggered by both the "motion"-profile and the "button pushed"-profile):
> 1. IF(%TRUN !~R *Skybell Pushed*){
> A. Flash text "In IF" (for testing)
> B. Then press the notification button
> }
> 2. Wait 20 seconds
> 3. Hang Up
>
> That would do the trick I believe, BUT I cannot get the "%TRUN !~R *Skybell Pushed*" to work.
The way it is usually done is
%TRUN !~ *,Skybell Pushed,*
This will cover all the bases.
> As of now it enters the IF-statement every time I press the button.
> I have tried both "Doesn't Match" and "Doesn't Match Regex",
There is no need to use the regex for this.
and from I read from guide using the *-asterix before and after should be sufficient.
It should have without the regex.
You would have to post the exported task (as detailed above) for me to be able to tell why the IF action is failing. It is usually a unseen white space.
>
> Do I need to enabled/activate something in Tasker in order for variables like "%TRUN" to work?
>
No. However %TRUN will not work for this. %TRUN will always contain ,Skybell Pushed, because it is the same task that contains the action so it would have to be running.
I think your best option would be the %WIN approach.
Another way would be to make a timer variable. Something like this.
1. If %TIMES > %Timer+300
2. Turn on live view
3. Variable set %Timer TO: %TIMES
4. End If
So it would only turn on live view once then it would wait 5 min before turning on again.
See user guide for %TIMES.