Display a scene permananetly unless destroyed by user

316 views
Skip to first unread message

Jay M

unread,
Apr 14, 2013, 4:52:08 PM4/14/13
to tas...@googlegroups.com
Im trying to make a Lockscreen like the Windows 7 login screen.using a Scene the actual login part i can do but what i cant do is this.
I have a shortcut on my desktop that shows my scene but once the scenes shown i need it so if i press a button for eg. the back button which hides the scene i need the scene to reappear again so access to the phone is blocked ( I no a reboot will destroy it)

Anyways i tried this task

Show Scene - Windows 7 lockscreen display as dialog (because i need the keyboard to show on top of the scene so i can type the password into the textedit box)
Test Scene - Windows 7 lockscreen - Test = status, Store result in %lockscreenstatus
Show Scene - Windows 7 lockscreen if %lockscreenstatus matches hidden
stop.

but it doesnt work anyone no what im doing wrong or even if this is actually possible.


 

Jay M

unread,
Apr 14, 2013, 5:43:59 PM4/14/13
to tas...@googlegroups.com


Show Windows7 Lockscreen (46)
A1: Show Scene [ Name:Windows7 Lockscreen Display As:Dialog Horizontal Position:100 Vertical Position:100 Show Exit Button:On Continue Task Immediately:On ]
A2: Test Scene [ Name:Windows7 Lockscreen Test:Status Store Result In:%lockscreenstatus ]
A3: Create Scene [ Name:Windows7 Lockscreen ] If [ %lockscreenstatus ~ hidden ]

Jay M

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

writer

unread,
Apr 14, 2013, 8:41:36 PM4/14/13
to tas...@googlegroups.com
Use action Show Scene instead of Create Scene.
Scenes overlay is permanent untill rebooted.

2013년 4월 15일 월요일 오전 5시 52분 8초 UTC+9, Jay M 님의 말:

Jay M

unread,
Apr 14, 2013, 8:53:19 PM4/14/13
to tas...@googlegroups.com
That didnt work thats what i did in the 1st post. 

writer

unread,
Apr 14, 2013, 9:51:22 PM4/14/13
to tas...@googlegroups.com
Sorry, I didn't read carefully.

You have to insert action: goto test scene before action: stop. in your task.

Dialog and Activity scene is not proper scene to lock screen.
Use  Overlay Blocking scene and make special key actions to input password or passcode.

Jay M

unread,
Apr 14, 2013, 10:38:21 PM4/14/13
to tas...@googlegroups.com
That give me an unfortunately tasker has stopped error, Yeah I was originally going to use Overlay Blocking as that ignores the back button but problem is it doesnt allow a textedit element which i need so my only option is to use the dialog scene which allows any elements to be used.

Jay M

unread,
Apr 16, 2013, 12:53:30 PM4/16/13
to tas...@googlegroups.com

Ok so I'm finally getting somewere :)

Show Windows 7 Lockscreen (78)
A1: Test Scene [ Name:Windows7 Lockscreen Test:Status Store Result In:%STATUS ]
A2: Show Scene [ Name:Windows7 Lockscreen Display As:Dialog Horizontal Position:100 Vertical Position:200 Show Exit Button:On Continue Task Immediately:On ]
A3: Perform Task [ Name:Windows 7 Lockscreen Status Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]

Windows 7 Lockscreen Status (46)
A1: Test Scene [ Name:Windows7 Lockscreen Test:Status Store Result In:%STATUS ]
A2: If [ %STATUS ~ hidden ]
A3: Show Scene [ Name:Windows7 Lockscreen Display As:Dialog Horizontal Position:100 Vertical Position:100 Show Exit Button:On Continue Task Immediately:On ]
A4: End If
A5: Goto [ Type:Action Number Number:1 Label: ] If [ %STATUS !~ hidden ]

What this does is when I press my scene shortcut on my homescreen my Scene shows and when I press the back button the scene gets hidden but instantly reappears again (Exactly what i want) but if I then press the back button again the scene hides and doesnt reappear, so what I need to do is make this loop so no matter how many times the back buttons pressed the scene just keeps showing.

Anyone no how I can do this.cheers.

Jay M

Wes Stacey

unread,
Apr 16, 2013, 1:34:45 PM4/16/13
to tas...@googlegroups.com, jaymen...@googlemail.com
OK i think the issue is that last item on your second profile

Windows 7 Lockscreen Status (46)
A1: Test Scene [ Name:Windows7 Lockscreen Test:Status Store Result In:%STATUS ]
A2: If [ %STATUS ~ hidden ]
A3: Show Scene [ Name:Windows7 Lockscreen Display As:Dialog Horizontal Position:100 Vertical Position:100 Show Exit Button:On Continue Task Immediately:On ]
A4: End If
A5: Goto [ Type:Action Number Number:1 Label: ] If [ %STATUS !~ hidden ]

A task is just a list of actions and it is going to just go down through each action 1 by 1. After the scene is initially launched in the first profile it launches the second profile which is going to go into a loop checking the status of the scene and as long as the scene is showing, that IF statement on step A5 is always going to be true so it will immediately jump back to Step A1 and continue looping.

The issue come when the back button is pressed. At that point the "Test Scene" action in Step 1 comes back "hidden" and then the if statement in step A2 becomes "True" and step A3 is executed and the scene is relaunched. However, notice that you never recheck the scene so the value of %STATUS is still what came back in step A2 which was "hidden" so you get down to Step A5 and that if statement come back FALSE so the goto step isn't executed and the loop breaks and the task end. 

in order to fix this i would change the if statement in A5 to not check the variable %STATUS and instead check a variable which tells you if the password has been entered correctly in the scene. so that the loop will execute until the password has been entered correctly.

I will warn you about doing this though, you are basically keeping Tasker running CONSTANTLY while this scene is being dispalyed which means that it will likely drain your battery quicker. If this isn't meant to be used all the time that is fine but if this is supposed to be some kind of custom lock screen i think you'll find that it will drain your battery much faster than an actual lock screen would.

Hope this helps.

-Wes

Jay M

unread,
Apr 16, 2013, 2:07:47 PM4/16/13
to tas...@googlegroups.com, jaymen...@googlemail.com
I never thought about battery life i was intending to use this a custom lockscreen but i think il give it a miss now lol, I always wanted a Windows7 Style lockscren and with the amount of android apps out there you would think sumone would have developed one by now, closest thing i can find is a Windows Phone 7 lockscreen. Anyways thanks for the help im just getting into using IF statements.

Devs if you read this make a Windows 7 style Lockscreen Cash waiting ;) 

Wes Stacey

unread,
Apr 16, 2013, 5:24:17 PM4/16/13
to tas...@googlegroups.com, jaymen...@googlemail.com
Can you post a picture of your scene so i know what you are looking for?

I'll think if there is a way we can do something less battery intensive.

Jay M

unread,
Apr 16, 2013, 8:12:35 PM4/16/13
to Wes Stacey, tas...@googlegroups.com

I actually haven't stopped messing with it I don't like to give up anyways i found a new way to do it using widgetlocker and 2 scenes the 1st scene (The screenshot) is a variable query and when the wrong passwords entered another scene appears for a split second with Access Denied on it and then the Variable Query Scene comes back up. but the problem with this way is once the variable query scene is displayed if I press the power/unlock button when the screen comes back on the scene is gone and I cant unlock the phone so im forced to reboot.

Il post the description in a bit cheers.

Jay M

Screenshot_2013-04-17-00-30-35.png

Jay M

unread,
Apr 16, 2013, 8:23:45 PM4/16/13
to tas...@googlegroups.com
Security (9)
A1: Variable Query [ Title: Variable:%code Input Type:Password Default: Background Image: Layout:Variable Query Timeout (Seconds):600 Show Over Keyguard:On ]
A2: WidgetLocker [ Cmd:Unlock ] If [ %code ~ Jellybam ]
A3: Show Scene [ Name:Access Denied Display As:Overlay, Blocking, Full Window Horizontal Position:100 Vertical Position:100 Show Exit Button:Off Continue Task Immediately:On ] If [ %code !~ Jellybam ]
A4: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A5: Destroy Scene [ Name:Access Denied ]
A6: Goto [ Type:Action Number Number:1 Label: ] If [ %code !~ Jellybam ]

Rich D

unread,
Apr 16, 2013, 8:26:30 PM4/16/13
to tas...@googlegroups.com

Just to throw another idea into the mix, you could monitor the widow label (%WIN) and re-show the scene if it changes and the password has not been entered. The win value should be the name of your scene when it is showing ...

Rich...

Jay M

unread,
Apr 16, 2013, 9:18:12 PM4/16/13
to tas...@googlegroups.com

The more the merrier, Im not sure what %WIN is or how to work it so I think I got some research to do cheers.

Jay M

Cptnodegard

unread,
Apr 16, 2013, 9:45:28 PM4/16/13
to tas...@googlegroups.com, jaymen...@googlemail.com

Jay M

unread,
Apr 17, 2013, 10:25:03 AM4/17/13
to Cptnodegard, tas...@googlegroups.com

I remember watching that a while ago, hopefully I understand it more now I'm not a complete tasker noob nomore lol cheers.

Jay M

Reply all
Reply to author
Forward
0 new messages