Android: There are plenty of automation tools available for Android, but Automagic is one of the first we've seen that guides you through the process of creating actions in a smooth, easy-to-follow manner. Don't let the wizard fool you; the app is remarkably powerful.
Automagic is just as powerful as other automation tools, but what makes it really worth a look is the way you design and build the tasks you want to perform. The app guides you through the process by establishing each action as a "flow", consisting of a trigger, an action and a condition. Then the app walks you through selecting each element, building a flowchart as you go that describes what you want the task to do. You action is shown to you like a flowchart, complete with true/false conditions that lead to different outcomes, and you can make it as simple or as complex as you like.
For example, you can build a simple flowchart that turns off Wi-Fi and Bluetooth when your battery gets below 50 per cent, or build a more complicated one that, when your battery is at 50 per cent, checks to see if Wi-Fi and Bluetooth are on and connected to something, and only disconnects them if they're not, or if Wi-Fi is connected to a network that's not your home network, or also change the brightness of your phone in the process.
Other apps such as Tasker, Llama, and Atooma all have similar features, but it's Automagic's GUI that makes it stand out. The full version costs $4 at Google Play, but you can download a 30-day trial to see if it works for you from the developer's website before you buy.