Apps like Llama let you use location-related properties (such as Wi-Fi network visibility) to trigger automation actions such as putting the phone on silent, but they do this by running as a background service and polling for Wi-Fi networks or directly for location.

The Google Play Services library contains a geofencing facility, which allows apps to define geofences and to be started in response to (the phone) entering or leaving those geofences.

Since Google Play Services already needs to run and update my location for things like Google Now and Location History to work, I'd like to be able to use this to have it automate things on my phone, without having an extra service in memory all the time and running periodically. Is there a way I can set this up on my phone? Perhaps there's an app like Llama but using Google Play Services geofences instead of Wi-Fi, or a way to configure Tasker so that it only runs when triggered by a geofence I define. (I've never used Tasker.)

2 Answers 2


The AutoLocation add-on for Tasker allows you to do this. It makes use of Google Play Services Geofences, and is put out by one of the most reputable Tasker add-on designers around.

To set it up once you've installed Tasker and AutoLocation, create the geofences in the AutoLocation app and click start geofence. Then in Tasker you can set profiles to start from an Event. Choose Plugin, then AutoLocation, then Geofence, and set up the condition. Be sure Tasker is enabled (if the app icon in the action bar isn't coloured, long-tap it). Tasker does have a foreground service (always-on notification) by default: you can disable it from Tasker's preferences.

One shortcoming of this technique is that AutoLocation's geofences only create events in Tasker, not contexts, so you can't have settings changes automatically undo themselves when leaving the geofence.

  • That's a good tip. Is it possible to make this combination work such that Tasker's "monitor" isn't running all the time? The Tasker FAQ suggests that you can't do this reliably.
    – Dan Hulme
    Commented Jan 8, 2016 at 17:11
  • As far as I know, Tasker's monitor only runs when called (I.e. used in a profile or task) so if you use AutoLocation, then that will run instead. Commented Jan 8, 2016 at 17:58

Most automation apps support geofencing, using either the Google Play Services or the standard proximity alert APIs. Automate has built-in support for both, see settings. However, the Google Play Services geofencing is no longer the default as it has proven to be the most unreliable.

  • It seems like Automate uses a foreground service even if you set it to use a Google Play Services geofence. Is there a way to make it only run when started by the geofence intent, instead of having a foreground service all the time?
    – Dan Hulme
    Commented Jan 11, 2016 at 18:09
  • @DanHulme No, most features require some kind of background processing. If the system requires all memory the foreground service will be terminated regardless, and of course restarted when memory becomes available.
    – ballzak
    Commented Jan 11, 2016 at 23:09
  • The whole point of using Google Play Services geofences is so that the service doesn't need to be running all the time. GPS will start it by intent when the geofence is entered or left.
    – Dan Hulme
    Commented Jan 11, 2016 at 23:41
  • @DanHulme Sure, but automation apps usually have lots of other features that do, and to do so reliably. So does the Google Play Services, it constantly have around 8 services running, although it doesn't need "foreground services" since it has special permission.
    – ballzak
    Commented Jan 12, 2016 at 6:54
  • I know, that's why I asked a question specifically about this feature, instead of just picking any automation app. Since I have Google Play Services running anyway, I don't need a second app polling location all the time.
    – Dan Hulme
    Commented Jan 12, 2016 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .