Wednesday, December 6, 2017

Automate Flow: Always go back to Home screen whenever phone is unlocked at launcher screen

This is an example of Automate flow. To learn more about Automate for Android phones, click here.

This is a very simple Automate flow with only 4 blocks (including the Flow beginning block).

Most if not all Android launchers support multiple screens for you to organize your apps and widgets into different screen as needed. One of the screens is your Home screen, which normally is where you put your mostly accessed apps and widgets.

When you are at the launcher screen without any opened foreground app, you can always go back to the Home screen by pressing your phone's Home soft key or Home button.

If most of the time, when you unlock your phone and start using it, you want to be at the Home screen regardless of which launcher screen you were at when your phone went to sleep and locked itself, this is exactly what this Automate flow will do.



This flow will wait until you unlock the phone, and check if you are at the launcher screen (meaning, no app is opened at the foreground). If yes, it will emulate pressing the Home button so that you will go to the Home screen automatically.

If you were running an app at the foreground (such as Whatsapp, browser, email, Facebook, etc.) when the screen was last locked, the flow will do nothing and you will return to the app screen after unlock.

In order for this flow to work properly, you need to set the correct launcher app of your phone in the "Is foreground app" block, because different Android phone vendor might provide their own launcher app to the phone. In addition, Android system also allows you to install and use 3rd party launcher app such as Nova launcher, Apex launcher, TSF launcher, etc.


You can tap on the "Pick activity..." button as shown above to select the launcher app you use in your phone.

The setting in the above screen is for Samsung TouchWiz launcher. For HTC phones, set the Package to "com.htc.launcher" and leave the Activity Class as empty field.

What if you never set any screen lock to your phone? In that case, you just need to change the "When device unlocked" block to "When screen is on" block.

Monday, December 4, 2017

Automate Flow: Switch your phone between Vibrate and Normal profile with customized mute

This is an example of Automate flow. To learn more about Automate for Android phones, click here.

Your Android phone is likely to have 3 general sound profiles:

  • Normal - ringer (for incoming calls) and notification will play a sound.
  • Vibrate - ringer and notification will mute. The phone will vibrate when there is incoming call.
  • Silent - ringer and notification will mute. There will be no vibration as well.
In fact, your Android phone has the following 6 types of sound, which you can set their volume individually (note: certain phone has paired the ringer and notification sound volume, so that the notification volume will always follow the ringer volume):
  • Ringer - for ringing tone sound
  • Notification - for notification sound
  • Media - for music and sound in apps, including Whatsapp, Facebook, Youtube, etc.
  • Alarm - for alarm sound
  • In-call - for phone conversation
  • System - for shutter sound of camera, screen lock/unlock sound, keyboard sound, etc.
When you switch your phone's sound mode from one to another among Normal, Vibrate and Silent, the volume of these 3 sounds will be changed accordingly: Ringer, Notification and System.

Note that the sound volume of Media, Alarm and In-call remains unchanged. This means when your phone is set to Vibrate or Silent mode, your instant messenger apps will remain unmuted and will still giving out sound, because Media sound remains unchanged.

You might want to also mute the Media sound when you set your phone to Vibrate or Silent mode, and un-mute the Media sound when you set it back to Normal mode.

Of course, there are apps that enable you to set additional customized sound profiles, but I am going to share with you how you can do it yourself by using a simple Automate flow.

The flow below will help you toggle between Vibrate and Normal sound mode. Since the Notification and System sound will follow when the Ringer sound changed, you just need to toggle the Ringer mode.

The beauty of this flow is on its next step. When you toggle the Ringer mode to Vibrate, it will also mute the Music audio. When you toggle it to Normal, it will unmute the Music audio accordingly.

To use this flow, run it once to enter Vibrate mode, and run it again to go back to Normal mode. The flow will display a message about the mode you have changed to, and end.

With this example, I'm sure you can easily modify it to toggle between Silent and Normal mode and save it as another flow.

You can also make it a single flow to toggle among Silent, Vibrate and Normal mode. That will require another block to check "Is ringer mode Vibrate?" when "Is ringer mode Normal?" returned a No. If this returns Yes, you might want to set ringer mode Silent, mute audio Music, and display "Silent mode" in the toast.

Making your Android phone smarter by programming task automation using Automate

Automate is a freemium Android app developed by LlamaLab that enables you to perform task automation in your smartphone.

With it, you can really make your phone much more smarter by running programs constructed using simple flowchart called Flows. All programming in Automate is done graphically by drawing flowcharts (without writing a single line of code) by joining building blocks, whereby each block will perform a single task.

A sample Automate flow looks like this:


Some of the examples that you can program your phone with Automate to do smartly:
  • Every morning when you wake up, greet you with a female voice with weather information and major stock markets closing index point. Pick up your calendar event and read out your appointments in the day.
  • When you are driving your car, auto enable Bluetooth and auto connect your phone to your car's Bluetooth hands-free function, and auto answer any incoming calls. When you leave your car, auto disable Bluetooth and resume manual phone answering.
  • When you are approaching home, auto send a Whatsapp message to your spouse that you are on the way and will arrive soon.
  • When you arrive home, auto turn on WiFi function and connect to your home WiFi. When you leave home, auto turn off the WiFi function to save battery.
  • Whenever you open Spotify app at home, auto enable Bluetooth and connect to your wireless speaker. When you open Spotify at other places, it won't do this and will play the music using your phone's speaker instead.
  • Whenever you enter into your favourite cinema hall, auto mute your phone and set it to vibrate mode. Unmute it when you leave the place.

Automate comes with several hundreds of ready made building blocks. There are basically just 2 types of block:
  • Action block which has a single output (example: Enable WiFi)
  • Decision block which has 2 outputs, 1 for Yes and 1 for No (example: Is WiFi enabled?)
For decision block, you can set the evaluation to be tested immediately (example: Is WiFi enabled?) or wait for the condition to change (example: When WiFi is enabled or disabled).

The ready made building blocks are grouped in the following categories:
  • Apps
  • Battery & Power
  • Camera & Sound
  • Concurrency
  • Content
  • Date & Time
  • File & Storage
  • Flow
  • General
  • Interface
  • Location
  • Messaging
  • Sensor
  • Settings
  • Telephony
Here is an example of available blocks inside one of the categories above (Camera & Sound).


To use Automate, you can either:
  • Just run the sample flows that suit you
  • Create your own flows and run them
  • Download flows shared by other users in the community
  • Download flows from the community, and modify them to suit your need
Automate comes pre-installed with several useful sample flows.


There is also a user community for its users to upload and share their flows with other users. You can upload your flows in the community too.

Community flows are categorized into the following groups:
  • Business
  • Communication
  • Education
  • Entertainment
  • Finance
  • Games
  • Health & Fitness
  • Home
  • Media & Audio
  • News & Magazines
  • Personalization
  • Photography
  • Productivity
  • Security
  • Shopping
  • Social
  • Sports
  • Tools
  • Transportation
  • Travel & Local
  • Tutorials & Examples
  • Weather
Below are some of the top rated community flows available for download:


A running instant in a flow is called a fibre. Each flow when executed will have one or more fibres.

The free version of Automate app is fully functional and ads-free, only with restriction of allowing up to 30 running blocks in all the running fibres. This is sufficient for most simple tasks. If you need to run more complex flows, or need to run a lot of flows concurrently, you can pay a small fee to upgrade to the Pro version.

If you configure Automate to run on system startup, all its running flows will resume from their previous running state even after a restart.

With Automate, you can make a lot of wonders in your phone, without writing a single line of code. All you need is constructing your logics with blocks and charting them into flows.

Hint: Click on the "Older Posts" link to continue reading, or click here for a listing of all my past 3 months articles.