Official Bug Tracker and Feature Request-Forum for the Android App Lock My Phone
You can get the app here on Google Play (500k+ downloads π).
Automate is one of my favorite apps because it allows me to control my environment better. This makes me happy.
Lock My Phone (LMP) can interact with Automate in three ways:
Example use case: Use this to automatically enable Do Not Disturb-mode when a lock period begins.
There are four possible states that LMP will broadcast to Automate:
To receive status updates from LMP in Automate you have to enable receiving broadcasts. Here is a flow that does just that (4 blocks):
Flow "Receiving lock status updates"
Example use case: Send daily email reports about your locks to a friend whom you promised you would use Lock My Phone regularly while you're preparing for an exam.
Flow "Receiving the lock list" (The fastest way)
Flow "Sending email reports about your enabled locks" (advanced example): This flow also shows you how to loop through the JSON data that LMP sends to Automate.
First you must get the ID of the lock you want to enable or disable. Each lock has a unique ID (a number, for example 3) which you can find in the menu of the lock on the bottom right:
To start a lock broadcast "START 3" (if 3 is the ID of the lock you want to activate) to Lock My Phone. Here is a flow that does that:
β¬ Flow "Starting a lock period from Automate" (The fastest way)
β Please note: Under Android 13 and up starting a lock from outside of Lock My Phone is only possible when Lock My Phone is already running in the background. To get LMP running in the background you must have at least one recurring lock period enabled. It can be a very short one that only locks your phone for 1 minute on 1 specific day only.
To stop a lock broadcast "STOP 3" (if 3 is the ID of the lock you want to activate) to Lock My Phone.