I
I
ilnazoon2015-04-30 13:07:53
Android
ilnazoon, 2015-04-30 13:07:53

How to block hardware buttons in services (Android)?

There was a need to write an alarm clock application. In this connection, the question arose - is it possible to somehow block the hardware buttons in Android.
Through keyEvent it is possible to block in Activity. And that's not all. Is it possible to block everything without Activity ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2015-05-02
@gadfi

You definitely won’t block all the buttons, why not start an Activity ? All alarm clocks I've seen do this.

I
ilnazoon, 2015-05-04
@ilnazoon

Through some manipulations, I still managed to block the Home button.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question