Llama Handling Guide

Llama is a Location Aware Mobile Application. It will allow you to change settings on your phone based on your location and time, so you can set the ringer volume, vibrate mode and ring tones for when you are asleep or at work.


Llama does not use GPS like some other applications, it also doesn't use any data connection so it won't eat into your data plan. Instead, Llama uses the unique ID given to each phone mast (or cell) that your phone is connected to. You have to train your Llama so that it know which location each of the phone masts this corresponds to.

Training your Llama is easy. Simply tap the Areas tab then long-press the area where you currently are and choose Start Learning Area. Llama will then want to know how long you plan to stay in your current location. Once you've chosen a time, Llama will be on the look out for cell towers and it will assign those towers to your chosen location. If you want to teach Llama a different area, you have to be in the place that you want to teach, e.g. you cannot teach Llama about your workplace if you are still at home. Llama comes with both Home and Work areas, but you can delete these and add new ones by pressing the Menu button on your phone

Llama shows you the recent phone masts that it has seen on the Cells tab. This tab shows you which areas Llama thinks the cell is in. You can long-press a cell to manually add it to an area or to remove it from an area if it was learned incorrectly. Cells can be part of as many areas as you like. For example, you can have three areas named Office1, Office2 and Work. The cells in Office1 and Office2 are different, but the Work area contains the cells that are in both Office1 and Office2. This way you can define events for each office separately or for your workplace as a whole.

NOTES: Since Llama uses cell tower location to identify your location, it is not very accurate. Llama works best in built up areas with lots of phone masts. The accuracy is around 100m to a kilometer. If your workplace is close to your home then Llama's location handling is not for you :( However, you can still use the time conditions to create events.


Profiles provide a way of grouping the ringer, vibrate, ringtones and notification tones, similar to how other phone manufacturers handle these functions. Each profile can also have an icon associated with it so that you can see which profile is currently activated in the notification bar. You can change the profile manually by using the Profiles tab, or by creating events that change the profile. Llama comes with some built in profiles named normal, quiet and loud. You can add new ones, edit these ones or delete them.


Events are at the heart of Llama. You define events to tell your Llama what you want it to do. Each event has a set of conditions and actions. When all of the conditions are met, the actions are run. Llama comes with some default events, but you can customise them as you wish. One of the events is named 'Quiet at night', and is based on the fact that you are at home, and the time is after 10pm. This means that when it is late and you are at home, it will turn the ringer to a lower volume. However, if you are at the pub and it's after 10pm, it will leave the ringer alone (NOTE: this is assuming that your home and the pub are suitably far away. Llama works best in built up areas with lots of phone masts).

To create events, click the events tab and then press the Menu button to add an event. You can then add as many conditions and actions as you like for your new event by pressing the Menu button.


For an event to fire, each of it's conditions must be met. Most conditions also act as triggers. e.g. entering an area or the time changing. This allows events to fire no matter what order the conditions occured. e.g. 'At work after 8.30am' will fire if you get to work after 8.30am, or if you are already at work before 8.30am and you are still there as the time changes to 8.30am.
Bluetooth Device Connected
Fires when the chosen paired Bluetooth device is connected.
Bluetooth Device Disconnected
Fires when the chosen paired Bluetooth device is disconnected, or you turn off Bluetooth.
Car Mode
Fires when your phone enters or exits car mode, either through entering a car dock or by running the car home application.
Charging or unplugged
Fires when your phone is connected or disconnected from the charger.
Day of the Week
Use this to only let the event's actions run on certain days.
Enter/In Area
Occurs when you enter an area, or require your phone to be in an area.
Leave Area
Occurs when you leave an area, but does not stay true. See Not in Areas condition
Music Playback
Fires when music starts or stops playing. Probably only works for music applications that use the built in media playback service
Not in Area
This condition will trigger events when you have left all of the selected areas, and will remain true for as long as you are not in those areas.
Time Between
Occurs when the current time is between two times. You can also span period over midnight. e.g. 10pm until 6am.


All actions will happen when an event's conditions are met. You can also test the actions by long-pressing an event in the Events tab or by pressing the Menu key and choosing Test Actions when you are editing an event.
Change Brightness
Changes the phone screen's brightness.
Change Music Volume
Changes the music/media volume, so that you do not need to have a specific profile just for music volume.
Change Profile
Changes the phone's ringer and vibrate settings according to a profile defined in the Profiles tab.
Kill Application
Terminates an application (as best as permitted by Android OS restrictions)
Reboots your phone. This requires your phone to be rooted. Be careful with your conditions. You do not want your phone to reboot every time you are at home. If your phone has not been on for at least 5 minutes, it will not reboot so that you can fix any wonky conditions.
Places a notification in the notification bar with the text that you specify. NOTE: this is incomplete and a bit ugly at the moment.
Run Application
Runs the specified application.
Toggle Account Sync
Turns account syncing on and off
Toggle Airplane Mode
Turns airplane mode on and off. Due to the way this works, it will also turn off your Bluetooth and WiFi
Toggle APN
Turns mobile data on and off for GSM networks.
Toggle Bluetooth
Turns Bluetooth on and off.
Toggle GPS
Turns GPS on and off.
Toggle Screen Lock
Turns the screen pattern or code lock on and off. NOTE: this is buggy at the moment. If the Llama service gets killed by Android, then the screen lock will turn back on.
Toggle WiFi
Turns WiFi on and off. You can also make sure that Llama doesn't disconnect you if you are already connected to a WiFi network

Event Examples

Event's usually come in pairs. e.g. one for entering an area and another for when you leave that area. Additionally, you'd have one event for the daylight hours and one for the night time. The default events are set up as follows:

  • Normal at home - At home between 6.30 and 22.00 - Change to Normal
  • Quiet at night - At home between 22.00 and 6.30 - Change to Quiet

There is also another event called 'Left home' to ensure that the profile gets changed back to Normal for when you go out after the Quiet at night event has happened at 10pm.

You can also create an event that disables/enables APN mobile data, so your phone isn't pointlessly checking your email overnight. Another event I have turns on Bluetooth in the morning at the time just before I leave the house. Note that using 'left home' would mean that Bluetooth wouldn't turn on until I had walked for a few minutes from my front door.


Llama has some global settings that you can change using
Alternative icon colour
Toggle this to use a light icon instead of a dark icon.
Notification Mode
The lets you pick how you are notified of profile changes. The recommended settings are the Ongoing Notification modes, as this also instructs Android to be a bit more friendly to the Llama service.
Use 12-hour time pickers
Llama will use the time format for your country. However, if you can understand both 12- and 24-hour times, you'll have less clicking for a 12-hour time picket ;)
Ignore Invalid/No Signal cell
There is a special cell called 'No Signal'. This cell is used when you are out of service. If you home or workplace has a weak signal, this will cause Llama to fire any events for leaving home or work. Tick this box to disregard the no signal cell when deciding which area you are in.
Cell Polling Mode
Whether to wake the CPU every so often to look for cell changes. This potentially provides less laggy enter/leave conditons, at the cost of a tiny amount of battery life. You probably don't need to turn it on.
Cell Polling Interval
How often to poll if Cell Polling Mode is enabled
There are also some debug settings if you are feeling geeky.
Force Persistant
On devices with a low amount of memory, Android will kill services to keep a foreground app running. Android will then restart the service when it has more free memory. When Force Persistant is enabled, Llama will try and get itself alive quicker. You probably shouldn't enable this