Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'd like to have a feature that allows my Android phone to change its lock mechanism automatically dependent on location. For example, most of the time I use pattern unlock when out and about but tire of unlocking it constantly at my desk at work. Other solutions are:

  • manually change to a slide lock while at work - but must remember to revert it back after;
  • enable dev feature: no sleep while USB charging - but is a bit of a hack;
  • there are likely other semi-solutions...

I'd like for my phone, when it detects my work zone for example, to require me to unlock using the current pattern lock only once and then automatically revert to a slide unlock thereafter, until the phone leaves the zone at which point it reverts back to pattern unlock for higher security.

Is there an app or configuration that supports something like this already?

share|improve this question
    
Guess you'd need to use the GPS and figure out the latitude/longitude of each zone, then use tasker to determine the GPS coordinates... –  t0mm13b Oct 2 '12 at 20:59
    
Usually a combination of GPS and WiFi is used. GPS doesn't necessarily know exactly what floor I'm on but WiFi SSIDs and strengths helps support a more granular location. Indeed, location-based services are prevalent. I wonder if they're available in the kind of app that I'm seeking. –  John K Oct 2 '12 at 21:01
    
Apologies @t0mm13b, I didn't read "tasker" in your comment as the app named Tasker until I saw it referenced in the answer below. –  John K Oct 2 '12 at 22:50
    
No worries there - The tasker master below has answered! :) –  t0mm13b Oct 2 '12 at 22:56
add comment

2 Answers 2

up vote 6 down vote accepted

As t0mm13b already suggested, Tasker can do that easily:

  • Condition: [Location]
  • Task: Keyguard disable/enable

For location, you can use different sources:

  • GPS (most power-hungry variant, as it requires a permanent GPS scan -- but most accurate)
  • network based (less power-hungry, but still requires at least WiFi -- but less accurate)
  • cell based (least power-hungry, not to say: using almost no additional power, as the mobile cells are either used for telephony and mobile data -- but also least accurate)

You can even combine them: having e.g. cell-based combined with GPS would only start GPS scanning when the cells already match.

The trickier part will be the "require once" element, which will be doable with a more complex Tasker profile. If this is relevant to you, I will update my answer to include some hints on this.

Other (and easier to learn) solutions might be available as well, but I'm not sure whether they can control keyguard. So you might want to take a look at Llama - Location Profiles, which can at least handle the "location-based" part quite well. And of course you can check the "other users also liked" section for these apps on the playstore.

share|improve this answer
    
FYI - Llama can also handle WiFi SSID conditions, IIRC. –  Sparx Oct 3 '12 at 9:52
    
Oh, completely forgot about those -- thanks for the hint! Tasker of course can handle those as well. Question is just if Llama can handle keyguard... –  Izzy Oct 3 '12 at 11:25
    
It can enable/disable screenlock as well as enter/clear password lock. And it's free as opposed to Tasker. A good alternative, IMO. –  Sparx Oct 3 '12 at 14:05
    
Llama's Screen Lock action reports itself "buggy" and I haven't been able to get any incarnation of it to work on my Nexus S (have given it admin privs). Otherwise I'm impressed at the slew of options in Llama and that it doesn't use a lot of battery. It also supports WiFi (experimental) in addition to phone masts for better location resolution. (Next I'll try Tasker to see if that suffices the requested screen lock behaviour.) –  John K Oct 3 '12 at 16:00
    
I'm trying the Tasker app now to disable keyguard when my home network SSID is detected, but haven't figured out how to program a Task to do this. If you could update your answer to provide pointers for somebody completely new to the Tasker app to achieve keyguard disablement it would be much appreciated. I'm sure I'll eventually get there on my own. –  John K Oct 6 '12 at 3:37
show 1 more comment

If you are OK with using password protection for your lockscreen instead of the pattern, it does work with Llama, which is free (unlike Tasker).

As John K pointed out, the "Screen Lock" action does not seem to work for most people. However, you can use the "Screen lock password" action to set an empty password to disable the lock screen, and set it back to your normal screen lock password to enable it again.

However, your phone will likely (haven't tested) unlock automatically when you arrive at work without requiring the initial unlock you want. EDIT: yes it does

I posted this in case anybody still needs this (as I did) and couldn't comment on the accepted answer as I am new to this site.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.