Simplified question: How can I send my location via Telegram with a physical button?

On iPhones this would be simple. When jailbroken, you can define any custom action you want for any physical interaction, e.g. long press VOL+ while the screen is off. I'm basically looking for the same functionality on android.

The MiKey isn't a solution since a headset will be plugged into the phone.

What I thought of was using one of these bluetooth remote shutters, but I'm not sure on how I'd make that send a telegram message. The best solution would be using a smart watch, I don't have one right now but I'd get one of those cheap < $10 ones for this task. I found this one as an example and it says it can control the phone's camera off the watch.

So my question would be: Can I somehow "catch" that remote shutter signal and feed it into an application that can send my location to Telegram? I'm open to any solution as long as it's open source. I'd be in on making my own Android application, but I'm unsure if this is even possible or if a watch like that can control nothing but an actual camera application.

If someone has another idea on how to realize what I want on android (e.g. simply by long-pressing one of the volume buttons while the screen is off) I'd appreciate any idea.

Android 7 on a Motorola Moto E4. Stock ROM. No root.
Bonus: After successful sending of the location, get a haptic feedback (e.g. vibrate for a second)

Background information (in case someone has an entirely different idea): I need this for my work. I work in a field where I have to go to a ton of places. In order to avoid going to the same place twice, I have a Telegram bot that takes track of my work and stores where I've been so far. Given I go to hundreds of places every day, the time it takes for me to manually send my location to the bot for every place is quite significant, and I would like to cut that out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.