Skip to content

tomkahn/lockmyphone_public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 

Repository files navigation

Lock My Phone

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 πŸŽ‰).

Getting Lock My Phone to work with Automate (and, by extension, Tasker)

Automate is one of my favorite apps because it allows me to control my environment better. This makes me happy.

Overview

Lock My Phone (LMP) can interact with Automate in three ways:

  • LMP will notify Automate via broadcast every time the lock status of the phone changes.
  • Automate can demand a list of all existing locks from LMP (via broadcast). LMP will then broadcast that list back to Automate.
  • πŸ†• Enable or disable individual locks (works with one time and recurrring locks).

1. Receiving status updates from LMP in Automate

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:

  • Lock period inactive
  • Lock period active, inside lock area
  • Lock period active, outside lock area
  • Lock period active, lock everywhere

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"

2. Receive a list of all currently enabled recurring locks

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.

πŸ†• 3. Enable or disable a lock

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:

πŸ–Ό Where do I find the ID?

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.

About

Bug Tracker and Feature Requests for the Android App LOCK MY PHONE: https://play.google.com/store/apps/details?id=tomka.lockmyphone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published