Finally the resumed event was added, so here is my lock screen.

Finally the resumed event was added, so here is my lock screen. Maybe you don’t believe, but I have this lock screen (two scripts) since the alpha! I even posted the scripts once (now they are improved) And that’s why I can publish it now, I just managed to have some free time to record the video.

Story: I read once that pattern/pin/password as lock screen are not really secure in the fact that the fingerprint tells you the path/numbers/letters.

It was said on a research, but unfortunately I couldn’t find it (if someone know, write here the link)

In the research, the conclusion was that the ‘best’ lock screen (in the fingerprint part) will be one with a color password, colors placed randomly on the screen so you just need to click the color password in order. Since the position of the colors is random, even if you know where exactly the user clicked, you can’t know which colors did they click.

The only thing I saw was the app ORBIE

This lock screen is made of two scripts: one that unlocks the screen if you click the items in order (configurable, uses the id of the items) and the other just place the items in random cells (configurable too).

Since the items can be whatever you want, you can make the lock screen with apps, pictures, colors, shapes…

Of course you can use them separately, perhaps you just want the lock sequence

Instructions:

– Place some items in cell mode.

[If you want to move them randomly]

– Set the resumed event to run the ‘randomize’ script. If you want some items to not move, place them in free mode

– IMPORTANT: configure the script with the available cells where you want to place the items.

[The lock part]

– Set the click event of the items (all that will be part of the ‘pattern’ ) to run the ‘locksequence’ script.

– Click one item to set your first password

– To change it just perform the sequence while unlocked and follow the instructions. (The time to wait is configurable)

—————————————

Locksequence script

—————–

var interval = 2000; /* time in milliseconds to wait until new lock set*/

var tag = LL.getScriptTag();

/* in case they don’t exist*/

if( tag != undefined ){

var data = JSON.parse( tag );

}else{

var data = new Object();

}

if(! (“a” in data)){

data.a=0;

}

if(! (“secuence” in data)){

data.secuence = [];

data.secuence[0]=0;

}

var item = LL.getEvent().getItem();

/* to notify the click*/

item.setVisibility(false);

setTimeout(function(){ item.setVisibility(true) ;},50);

if(data.a<0){

/* The set procces: negative numbers*/

data.secuence[ -data.a -1]=item.getId();

–data.a;

data.timeout = setTimeout( function(){isDone(data.a);},interval);

}else{

/* The unlock procces: positive and zero numbers*/

if(item.getId()!=data.secuence[data.a]){

/* wrong*/

data.a=0;

}else{

++data.a;

if(data.a==data.secuence.length){

/* good*/

data.a=0;

/* unlock or set new one*/

if(LL.isLocked()){

LL.unlock();

}else{

reset();

}

}

}

}

/* if no data found*/

if( data.secuence[0]==0 ) reset();

save(data);

function save(tosave){

LL.setScriptTag( JSON.stringify(tosave) );

}

function reset(){

if(!confirm(“Set a new lock?”))return;

data.secuence = [];

data.a= -1;

Android.makeNewToast(“Click the items in order\nWait “+ interval/1000 + ” second after the last click to apply” , false ).show() ;

}

function isDone(old){

var now = JSON.parse( LL.getScriptTag() );

if(old!=now.a)return;

now.a=0;

Android.makeNewToast(“Lock set with “+ data.secuence.length + ” steps”, false ).show();

save(now);

}

—————————————

Randomize script

————–

//Cell: [first position , size ]

var h = [1,3];

var v = [1,3];

var all = LL.getEvent().getContainer().getItems(); //Or use the container you want

var items = [];

var len = 0;

for(var i=all.getLength()-1;i>=0;–i){

var p = all.getAt(i);

if(p.getProperties().getBoolean(“i.onGrid”) ) items[len++]=p;

}

var free = new Array();

if(len > h[1]* v[1] ){

alert(“WARNING: a lot of items, or a small layout”);

return;

}

for(var i=0; i

var sh = 0;

var sv = 0;

do{

sh=Math.floor(Math.random()* h[1] );

sv=Math.floor(Math.random()* v[1] );

}

while(free[sv* h[1]+sh]!=undefined)

free[sv* h[1]+sh]=0;

sh+=h[0];

sv+=v[0];

items[i].setCell(sh,sv,sh+1,sv+1);

}

]]>

22 Commentsto Finally the resumed event was added, so here is my lock screen.

  1. Anonymous says:

    < ![CDATA[

    I’m not finding a “Resumed event”. Is it known by a different name within the settings?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    In the beta 😉

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Ohhh, haha. I thought i was blind for a minute.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Okay, opted into the beta and set the script to the resumed event. Now when I exit out of settings I get this error: http://imgur.com/wQBmyXA


    Did I do something wrong? I know nothing about scripts.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    It is looking into the lock screen, and it seems you didn’t have it enabled.


    If you want to set it in a different container for some reason you will need to take it from their id. As you don’t know scripts just ask if this is the case.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Got it working! This is seriously genius. I was using AcDisplay because it’s great for notifications, but this is the lockscreen I’ve been looking for since I first got an android phone. If you give me some info on how I can donate to you I will when my next paycheck comes.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Dane Getting Thank you very much. It is really appreciated, but I don’t have any link yet. I do the scripts just for fun, and also to get experience. (Maybe in the future? I don’t know)


    Thank you 🙂

    ]]>

  8. Anonymous says:

    < ![CDATA[

    No problem. Thank you for your patience and expertise! Let me know if/when you get something set up for donations 🙂

    ]]>

  9. Anonymous says:

    < ![CDATA[

    I’ve been using LL (and now LLx) for a couple years, but never dived into scripts.



    So the newb question:  How do I install these scripts?

    ]]>

  10. Anonymous says:

    < ![CDATA[

    In the app drawer you should see a new app call Script editor, refresh if it is not there. You can also open it from any event set to open the script editor.


    Then you will see a big textbox and some buttons, paste the script you want there and then set it where necessary following the instructions of each script (in the run script event)

    ]]>

  11. Anonymous says:

    < ![CDATA[

    TrianguloY Thanks.  I got it working now.



    I also managed to ignore the “don’t set the lock screen until you have a way to unlock it” warning and spend some time dealing with that.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Ok thanks 🙂


    Next time a device reboot just fix it (well, it let’s you go to the main desktop and the settings, then you need to add a way to unlock before unlock again 😉

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Please help me. RandomScript cannot be used.


    http://imgur.com/D9p6ueE

    ]]>

  14. Anonymous says:

    < ![CDATA[

    田中五郎 Oops, my mistake.


    I fixed it now, try again (copy and paste the modified script)

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Thank you for the modification!

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Hi all! I can’t configure “random” script. It gave me the same error of Dane Getting at line 12.


    I’ve just approached scripts, so and I’ve tried write something (it seems with no sense!), and now I’m asking you the solution of my (personal) mistake. I think I understood what to do, but I can’t…


    Thanks!

    ]]>

  17. Anonymous says:

    < ![CDATA[

    I guess you are not launching the script from a container. How are you launching the script?



    And please, if you did modify the script so now it doesn’t work, and you just want to know why (which is fine)


    Please, please, post the modified script! 😉

    ]]>

  18. Anonymous says:

    < ![CDATA[

    From desktop’s menu, gesture and action, resume, start script, randomize script.


    The result is “a lot of items or a small layout”


    I know I’ve to “configure the script with the available cells….” but I can’t do this 🙁

    ]]>

  19. Anonymous says:

    < ![CDATA[

    Which size (of the desktop) do you have and where do you want the items to be placed?


    Example: “I have a 5×5 desktop and I want the items to be placed from the top left corner to the bottom right one”

    ]]>

  20. Anonymous says:

    < ![CDATA[

    6 x 8 grid


    9 items (3×3) at the bottom right corner

    ]]>

  21. Anonymous says:

    < ![CDATA[

    So change



    var h = [1,3];


    var v = [1,3];



    With



    var h = [3,3];


    var v = [5,3];

    ]]>

  22. Anonymous says:

    < ![CDATA[

    😰 so simple…. fu**…. Thanks TY!

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *