How To Automatically Unlock Your Android Phone When Connected To a Trusted Wi-Fi Network

Erez Zukerman 12-09-2013

A smartphone is a very personal device; I definitely wouldn’t want anyone fiddling around with my phone without my knowledge. Worse still, were anyone to steal the device, I wouldn’t want them to be able to access any of my data. That’s why I use a PIN code to lock my screen, and why I’ve installed Cerberus, one of four great anti-theft solutions for Android The 7 Best Android Anti-Theft Apps to Protect Your Device If your Android phone gets stolen, you'll need a way to get it back. Here are the best Android anti-theft apps. Read More we’ve reviewed (our all-around winner, in fact). That said, repeatedly typing my PIN code all day long can quickly become annoying — doubly so when I don’t even really need my device locked, because I’m at home. This inconvenience may be part of the reason why people don’t use PIN codes as often as they should. So, wouldn’t it be nice were my smartphone clever enough to automatically unlock itself whenever I’m at a safe place? That’s exactly what free app Safe Areas [No Longer Available] offers.


A Free Solution That (Mostly) Works: Safe Areas

The need to automatically unlock your device when connected to a trusted Wi-Fi network is not a new one; we’ve covered an app called Unlock With Wifi Unlock With Wifi: Disable Phone Lock When On Your Home Wifi Network [Android] Read More way back in 2011. That app is still being maintained to this day, but it also costs a (relatively) whopping $5. Just for comparison, that’s more than what the all-powerful Tasker Tasker For Android: A Mobile App That Caters to Your Every Whim When it comes to device automation, there's just one 900-lb gorilla in the Android space, and that's Tasker. True, Llama is an awesome free automation app, but it doesn't aim for Tasker's full power. Tasker... Read More costs, for a tool that does just one thing. So, I set out to search for a free solution, found Safe Areas, and was pleasantly surprised by how straightforward it was to set up. The end result is a device that shows “slide to unlock” when I’m at home, and asks for a PIN code when I’m anywhere else.

The device I used is the Sony Xperia Z Sony Xperia Z Review and Giveaway This post is about a surprise; it's about a comeback, and about how a determined company can listen, learn, and make something beautiful once again. It's about the Sony Xperia Z, a premium, powerful, and... Read More running Android 4.2.2 PAC ROM The Best ROM For Sony Xperia Z? PAC, Reviewed I had recently started using the Sony Xperia Z, my first non-Samsung Android device in a while. Unlike the international Galaxy S4 (i9500), the Xperia Z has a wealth of available ROMs. Today I'd like... Read More . The device was not encrypted, and did not have any restrictive corporate management policies. Under these particular circumstances, Safe Areas worked well. Just like call recording How to Automatically Record Calls on Android and Never Run out of Space Recording phone calls is a great way to keep data for your records. Let's compare some apps that will do this on your Android phone. Read More , automatically toggling PIN code lock is one of those things where your mileage may vary: Future versions of Android or different security arrangements may break things. In fact, even on this device, Safe Areas only worked some (most) of the time, yet sometimes forgot to relock or unlock my device.

Before you begin setting up Safe Areas, ensure you are connected to your home Wi-Fi network. Otherwise you won’t be able to complete the setup, as you’ll see in a moment.

First, Safe Areas asks for permissions:



What permissions would those be? Android tells you about it in the next screen:


Basically, you’re letting Safe Areas become a Device Admin so that it can set and unset your device’s password. This is not the same as root access, and indeed, Safe Areas does not ask for root privileges at any point in the process.

Once you grant it permissions, it’s time to set your password:



You can either use a PIN code or an alphanumeric password. You may not use a pattern lock or face unlock: This is a restriction put in place by Android itself, rather than by Safe Areas. Here’s where you set the password:


With your PIN code or password selected, it’s time to tell Safe Areas where to unlock your device. Ensure you’re connected to your home (or other trusted) Wi-Fi network, then tap Create Safe Area:



You will then be shown the network you’re currently connected to, and could tap it to set it as a Safe Area:


Note that you can’t see all of the networks saved on your device – only the one you’re currently connected to.


Tap the network, and… you’re done. On my device, the whole process took less than a minute. As simple as could be, really.

The End Result

With Safe Areas installed, this is what I see when I’m connected to my home network:


This is the lockscreen, but with no password protection – just side to unlock. I would prefer it if there were no lockscreen at all: Just turn the device on and you’re back where you last were. This doesn’t seem to be an option, though. Still, even “slide to unlock” is much, much better than having to key in my PIN dozens of times each day.

As I mentioned at the outset, this worked most of the time, but was not completely perfect.

Easier Than It Seems

Cancelling my PIN code at home is something I’ve wanted to do for months now, but kept putting off because it seemed like a hassle to set up. It turns out that with the right tool for the job, this is a straightforward affair. Do you have a PIN code on your device? If not, would an app like this convince you to use one? Let me know in the comments. I’m also curious to hear if Safe Areas worked for you, and if you figured out a way to completely remove the “swipe to unlock” screen when at home (and enable PIN-code lock when elsewhere).

Explore more about: Computer Automation, Smartphone Security.

Whatsapp Pinterest

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

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

  1. Malki
    January 12, 2014 at 12:30 pm

    Looking for an unlock by location (GPS) feature. I know it isn't as secure, but it helps if you don't have WiFi.

    • Erez Z
      January 12, 2014 at 5:07 pm

      This is something you can do using Tasker (paid) or Llama Location Profiles (free). Both require you to root your device, and we have written about both in the past. :)

  2. Lizz
    November 18, 2013 at 8:01 am

    What if your phone is blocked and can't connect to a WiFi

    • Erez Z
      November 18, 2013 at 12:43 pm

      In this case, I believe you will have to unlock it manually.

  3. Pablo
    September 17, 2013 at 3:09 pm

    Nice one!

    unfortunately it didn't work for me, I have security rules enforced by my company (I'm assuming that's why it didn't work), but it worked like a charm with my wife's phone.

    thanks for sharing this.

    • Erez Z
      September 18, 2013 at 11:34 am

      Sure thing, and I'm glad it worked on your wife's phone!

  4. cleffty
    September 13, 2013 at 7:07 pm

    I don't use anything as I cant be bothered to type in passwords all day long.It works for me!

  5. Tom Brinkkemper
    September 13, 2013 at 8:05 am

    Nice discussion. There are more advanced apps out there doing the same thing. That's why Safe Areas is focused on people who just want it to work without reading a tutorial first. Smooth and effortless.

  6. Alex
    September 13, 2013 at 5:56 am

    Llama makes the same things for free :-)

  7. Darren R
    September 12, 2013 at 8:24 pm

    I've been using Smart Locker... Works fine on my Samsung Tab and S3

  8. Joe
    September 12, 2013 at 4:00 pm

    I really like that with Tasker I can set it to do this based on just being within range of the network. Since I use a very unique network there's not much risk in it unlocking in the wild. This helps when my wireless is flaky, but my phone can still see that it's there.

  9. Arvind
    September 12, 2013 at 3:56 pm

    I use Llama who does all this automation for me, it keeps the Cell Towers at home as the decider whether or not I am at home or not. Turns off Wifi, Turns on PIN Screenlock, Turns on Data, Turns on BT (if needed) Brightness Auto and many other things on leaving Home Area. Much better free automation solution for your Android

    • Paul Werner
      September 12, 2013 at 6:18 pm

      I came here to say this same thing. Totally agree that this is much better and I think the author of this article should check out Llama (or Tasker if they want to get more advanced)

  10. James M
    September 12, 2013 at 2:23 pm

    As a possible alternative to Safe Areas described here, you could look at the Unlock With WiFi app for Android. Last time I checked, there are both free and pay versions, with the pay version adding additional features. I think the free version also limited you to one home network, so if you need multiple ones, you'd have to pay or find another app.

    Now though, I use Tasker. It has no free version, but it only costs a few dollars and it's very powerful. I was able to replace most of the other apps I had for automating things with Tasker. The only one I kept was Busy Me: Phone Silencer because it was more easily able to handle keeping sound off before and/or after scheduled times, which is a feature I need. I would definitely suggest considering Tasker, especially if you want to automate a bunch of things.

    • Dany
      September 12, 2013 at 2:37 pm

      Any tutorial to setup Tasker to do this?
      That would be very nice :-)

    • James M
      September 12, 2013 at 2:50 pm

      I'm not sure exactly where or how I found the info to set it up, but I can tell you basically what I have. In my profile called Home Unlock, I check if Wifi Connected to my home network SSID, then turn Keyguard off. I added an exit condition to turn Keyguard on, so that when I disconnect the lock screen will activate again. I think you need the Secure Settings plugin app to control the lock screen, but that should be free. In case it matters, I'll also note that my device is rooted and I'm currently still on an old device running Gingerbread, but I'm not certain if either of those affect this. You may have to look into it a little bit to find out. I hope this helps though.

    • Dany
      September 12, 2013 at 7:24 pm

      Thanks, appreciate your feedback. I'll look around a little more and start playing with Tasker to see if I can come up with something.

  11. DE
    September 12, 2013 at 2:06 pm

    I've thought about doing this for some time now, but the one issue that's prevented it is combining the Wi-Fi with a battery saver. I'm not sure how the two would react together (and frankly, I've been far too lazy to check), but it seems a battery saver (which toggles Wi-Fi off while the screen is off) would render an app such as Safe Areas useless.

    • Erez Z
      September 12, 2013 at 3:36 pm

      I think it's a valid point. This is actually tricky as it is -- like I said, it interacts differently depending on ROMs and phones, so adding a battery saver to the mix may well make it even more finicky...

    • Tom Brinkkemper
      September 13, 2013 at 7:43 am

      Hi Erez,

      Thanks for the review! You explained my app perfectly :)
      As for the battery saver, I've build in a feature that allows for wifi to be turned off during sleepmode. It works for the build in Android sleep policy (that turns off wifi by default in sleepmode) but there are to many devices and apps to test all configuration.

      The app has been out there for a month or two and I'm working hard to solve any issues that come up. Please e-mail me if you have any issues, bugs or suggestions.