1. Golfdriver97's Avatar
    If you are like me, you want to have a security screen on your phone when you are out and about. But what about at home? I mean...you're at home, so why have a PIN enabled? There has to be a way to have a PIN outside the house, but just be able to pick up your phone and not fuss with a lockscreen. There is a way to do so based on your WiFi connection.

    You can set up your phone to enable and disable your PIN depending on your connection to your WiFi?

    Yep. This is simple for Tasker to handle.

    Why would someone want to do this?

    I set this up because even though Android now has an unlock per location, for me it would disconnect and reconnect randomly even with high accuracy settings on. I wanted something more consistent.

    I do have this up and running on my G4, and it works perfectly.

    [NOTE]Passwords work for this as well, but for simplicity, I will only be typing PIN[/NOTE]
    [INFO]No need for a PIN/Password already set up in settings.[/INFO]
    In order for Tasker to do this, this is what you need to do:
    Download Tasker
    Download Secure Settings

    Once you have both apps installed, we can get to work setting up your PIN bypass.

    [INFO]Tasker needs Secure Settings in order for the PIN to work.
    Set up secure settings as a device administrator (Settings>security>phone administrator)
    To ensure no glitches, I would suggest to enable Tasker as an admin.[/INFO]

    First off, open Tasker. You will see a couple starting screens. You can read them over and click the check icon at the top.

    Once open, you will see a screen that looks like this:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-screenshot_20150803-083921.jpg
    Tasker always opens on the Profile screen. For the next few steps, we need to be one screen over to the Action screen. You may swipe or tap the tab to get there.


    To begin, you will want to tap the '+' icon at the bottom.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-1.jpg

    You can then name the task whatever you would like. In this case, I chose the title 'Lock'
    (I already had this set up, but I made a screen shot to show what it would look like).
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-2.jpg
    Tap the check icon to finalize the name. It can be edited later.
    Next, we need to add an action. To do so, we will click the '+' icon at the bottom:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-3.jpg

    We then need to tell Tasker how we want this set up:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-4.jpg
    Selecting the plug in option brings the next screen up.
    This is where Secure Settings comes into play:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-5.jpg
    And click on Secure Settings.
    Clicking the edit button...
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-6.jpg
    That button will take us to the next screen.
    Choose Device Administration Actions, and select Password/PIN
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-7.jpg

    And follow to the next screen. Click Enabled.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-8.jpg
    This is where either a password or PIN can be entered. For a PIN, tap the bullet and enter your desired PIN.
    There is the classic entry and confirm lines.
    Once done, click Save, and you will be brought back to the Action Edit screen a few panels back.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-9.jpg

    At this point, you should be able to click back, and everything is saved.
    VW Maverick likes this.
    08-02-2015 11:05 AM
  2. Golfdriver97's Avatar
    Part one is done. We have the apps partly set up. Now on to the next piece of the puzzle.

    Now we need to do the same thing as a separate task but for when there is a connection to WiFi.
    Starting all over again, we will make a new task:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-10.jpg

    And I called this one 'Safe'.
    Click the check icon to save the name:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-11.jpg

    Click to add an action:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-12.jpg

    This time, we leave the button Disabled. This is what will kill the PIN requirement.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-13.jpg
    My own personal thing here: I activated the option for entering the PIN once after the connection to WiFi is complete. This is like a last ditch thing in case my phone is separated from me away from my house, but won't just unlock if near my router. This option is not required for the set up to work; I am just explaining why i did what I did.

    That being said, if you elected not to have an unlock once option enabled, you will not see the '/Wait for unlock'.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-14.jpg
    You can click back to exit.
    Now, step two is done. The next series of steps will bring everything together:
    On the Profile screen, click the add icon:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-img_3.jpg

    And click the State option.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-img_2.jpg

    Choose Net,
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-17.jpg

    Then WiFi connected.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-18.jpg

    Click the search icon to find your router name:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-19.jpg

    And select the name when it comes up. It should list in order of strength:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-20.jpg

    Now, both Elysium, and Elysium5 are mine. I don't want it to disconnect if I change, so i add them both. Adding another name you would have to click the search icon again.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-21.jpg
    Clicking back will prompt to choose a task. Select Safe.

    Here is the finished profile.
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-img_1.jpg
    Tasker is now set up for when you are connected to your specific router, you will not need to enter your PIN. Now a profile needs to be created to set up the opposite.

    For those familiar with Tasker, yes, an exit task can be set up, but I have found it to be a little buggy in this case, and I do not know why.

    What does work for me is setting up a new profile to enable everything when disconnected. Starting again, we click the add icon, with State:
    Click image for larger version. 

Name:	IMG_2.jpg 
Views:	27 
Size:	108.3 KB 
ID:	189800

    Choose Net,
    Click image for larger version. 

Name:	17.jpg 
Views:	27 
Size:	84.8 KB 
ID:	189801

    And you guessed it....WiFi connected:
    Click image for larger version. 

Name:	18.jpg 
Views:	28 
Size:	87.2 KB 
ID:	189802

    Yep..again, select your routers. But, here is the difference. At the bottom, select the invert option:
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-screenshot_2015-08-03-10-13-57.jpg
    What this does is tells Tasker that upon disconnection from WiFi, it is to ask for your PIN to enter your phone.
    Jonneh likes this.
    08-02-2015 11:05 AM
  3. Golfdriver97's Avatar
    That's it. You should be all set up.
    08-02-2015 09:45 PM
  4. Golfdriver97's Avatar
    As of this writing, this does not work on M. The reason is Secure settings crashes. Hopefully the developer gets it fixed for the new update. But for right now, it does cover almost everyone.

    Other notes...this most likely won't work with other security features enabled...finger prints, Knock codes, etcc.
    AKAndy likes this.
    08-03-2015 08:49 AM
  5. Sangramsinh Takmoge's Avatar
    On Lollipop 5.0.1, for whatever reason, the only secure setting config that works is: Device Setting> (Setting Table) System > automatic_unlock > (setting value) 1 for for Unlock and 0 for Lock.
    10-03-2015 03:50 PM
  6. Sangramsinh Takmoge's Avatar
    Plus, this works with FingerPrint.
    Golfdriver97 likes this.
    10-03-2015 03:51 PM
  7. Golfdriver97's Avatar
    Update: I have this up and running, with no issues on my Nexus 5X. This now does work with Marshmallow.
    12-19-2015 04:26 PM
  8. Topher Petty's Avatar
    Unlock seems to work fine on my new ZenPad 8.0 (Z380CX/P022), however, locking doesn't happen. The variable set suggestion by a previous reply doesn't exist on my new tablet. Any suggestions on getting this to properly work on this device would be appreciated.
    12-24-2015 04:52 PM
  9. Golfdriver97's Avatar
    Unlock seems to work fine on my new ZenPad 8.0 (Z380CX/P022), however, locking doesn't happen. The variable set suggestion by a previous reply doesn't exist on my new tablet. Any suggestions on getting this to properly work on this device would be appreciated.
    Did you try the method outlined in the guide?
    12-24-2015 09:23 PM
  10. Topher Petty's Avatar
    Verbatim.
    12-24-2015 10:48 PM
  11. Golfdriver97's Avatar
    Can you provide screenshots of the lock set up?
    12-25-2015 01:57 PM
  12. Topher Petty's Avatar
    Can you provide screenshots of the lock set up?
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-sslockover.jpg
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-sslocksecs.jpg
    [How to] [Tasker][Marshmallow] Unlock when connected to WiFi-sslockset.jpg
    12-25-2015 04:00 PM
  13. Golfdriver97's Avatar
    I'm going to be honest.... Not sure what can be wrong.
    Mine is set on a timer, and works quite well that way.
    12-25-2015 11:19 PM
  14. joelstitch's Avatar
    Anyone gotten this to work with pattern lock? I have a rooted Samsung S7 Edge and am trying to do the same thing but with pattern lock instead of Pin. Haven't been able to find a way that truly works. Even the Xposed Module called "No Lock Home is not doing it for me.
    07-18-2016 01:21 PM
  15. Golfdriver97's Avatar
    Anyone gotten this to work with pattern lock? I have a rooted Samsung S7 Edge and am trying to do the same thing but with pattern lock instead of Pin. Haven't been able to find a way that truly works. Even the Xposed Module called "No Lock Home is not doing it for me.
    Part of the issue is secure settings. It doesn't go into pattern locks.
    07-18-2016 03:07 PM
  16. billouetaudrey's Avatar
    Hi, when I set password, I have this message...
    Any idea ? (android 7)

    10-04-2016 06:49 AM
  17. Golfdriver97's Avatar
    Hi, when I set password, I have this message...
    Any idea ? (android 7)

    https://uploads.tapatalk-cdn.com/2016...3c8f4df191.jpg
    I have been getting that lately too. I'm wondering if a security update broke secure settings.
    10-10-2016 04:39 PM
  18. skyraven_ro's Avatar
    Same error for me also.
    CM13 on Oneplus 3
    Before I had an older Cyanogenmod where it worked...so something broke it at some point..
    Hope it gets fixed.
    10-16-2016 04:00 PM
  19. Golfdriver97's Avatar
    Due to an error for Secure Settings being outdated, this thread will be closed.
    Yesterday 09:19 AM

Similar Threads

  1. How can I get S voice into normal mode?
    By AC Question in forum General Help and How To
    Replies: 1
    Last Post: 04-17-2016, 10:57 AM
  2. Replies: 5
    Last Post: 12-23-2015, 11:03 AM
  3. Home WiFi
    By lozo0055 in forum Samsung Galaxy S6 edge
    Replies: 1
    Last Post: 12-21-2015, 08:42 AM
  4. App creation- Linking to online music database?
    By bcfcjake in forum Software Development and Hacking
    Replies: 0
    Last Post: 12-21-2015, 08:14 AM
  5. Sony Play Memories App updated to support 6.0
    By Unobtanium in forum Moto X Pure Edition
    Replies: 0
    Last Post: 12-21-2015, 08:05 AM
LINK TO POST COPIED TO CLIPBOARD