I am planning on making a button that is when pressed sets an alarm on my phone. I am planning on making an app that is creating the actual alarm, the app just have to be triggered by the hardware button.

My questions are:

Is this possible without a server (or is there a way to send directly to the phone, bluetooth maybe?)?

Can the app be triggered even if it is not running? (The app should just be installed on phone but you don't have to open it in order for it to receive the signal)

  • 2
    Why build this when you can buy it from flic.io?
    – hardillb
    Jan 9, 2019 at 10:00
  • 2
    flic.io is a product of shortcut labs, who are based in Stockholm, so you could go knock on their door ;-)
    – hardillb
    Jan 9, 2019 at 10:29
  • 1
    @Lukas if you find something that meets your needs, would you please come back here and let us know (post an answer, if necessary), as this could be very helpful to a lot of people. Thanks Jan 22, 2019 at 7:38

3 Answers 3


This is tricky. It would be easiest to run the Android app and wait for the button press. You can used off the shelf hardware like this IOIO board to do this. But then you have to ask your self if I am running the Android app then why do I not just press a button on the Android?

There are other ways to get an Android app's attention. But then you need to do something like running the app in the background. At this point you need to start thinking about battery life and what running something 24/7 in the background will do to the battery. It is absolutely possible to create an Android app that will significantly reduce battery life.

If you are comfortable with Android programming try and figure out how to run a program 24/7 with out draining the batteries which looks for an event driven by a button press. If not, consider reading more about IOIO programming. The IOIO board has been around for years now and there is a good possibility some like minded individual has already solve your problem.


You could hack an Amazon Dash button since they are cheap.

Or use something like a raspberry Pi Zero W, which is also cheap.

And both of there are much cheaper than @hardillb's suggestion of Flic.io, where prices start at $34.99 for a single button.

If you don't like those for some reason, take a look at AdaFruit. They have some interesting wearables, such as the Flora which also has a BT Low Energy version.

Sounds to me like this is a fun learning project, so why not go a bit Rube Goldenberg and set your alarm by hairbrush?

Your app will need to be running on your Android (or something to wake your app, or something to wake that something ... there has to be something to realize that someone wants to talk to the phone, even if it’s just a broadcast listener).

Be aware of our Android enthusiasts sister site.

  • 1
    A Amazon Dash button is wifi so would require something on the same network to listen for the ARP packets and then send a push message. A BLE button is the correct solution to the problem as stated, building one from off the shelf dev kits is relatively trivial. A flic button may seem expensive, but when you factor in development time (for both hardware and app) and the fact that they have built a very neat little package that you couldn't possibly reproduce at home it's not outrageous.
    – hardillb
    Jan 10, 2019 at 8:46
  • 1
    Sorry, but I don't understand your point about WiFi - my bad and I want to learn. I imagine we are talking HTTP and RESTful API to say that the button was pushed? If so, both need a "server" which is the 'phone to listen for HTTP (?). I don't object to Flic, although I wouldn't use it myself on price grounds. The OP has been rather vague, so we don’t know if this is a “make it fun” learning project, or something more serious. Maybe if he updated the question with more detail, we can give better advice.; but I imagine that he is just collection ideas of now, so let’s throw some at him :-) Jan 10, 2019 at 9:01
  • 2
    The Dash buttons can only make a call to Amazon's purchasing API (unless you buy the demo IoT button which costs about the same as flic button). If you want to use them for something else then you have to not configure them properly and then sniff the network for their IP address request packets to trigger events.
    – hardillb
    Jan 10, 2019 at 9:12
  • 1
    Thanks for clarifying (+1). Hacking them is one of those things that was perpetually in my ToDo list, as fun; but then the Pi Zero W came along ... Jan 10, 2019 at 9:13
  • 2
    Big thanks, I have only developed frontend and apps before and i am new to IoT things. some projects i was thinking of: a button that is pressed when i sit in my chair and sends a signal to an android app to notify me when i hav ebeen sitting down for too long, and also making my "dumb" blinds smart Jan 10, 2019 at 22:04

For the app side, You could also use something like Tasker, it will need to be triggered by something, from what I understand you may need to add the MQTT plugin / broker to it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.