java - Android: Detecting long key press when screen is off -


How to find a long key press in Android when the screen is off? Is there any way to do this?

This is not possible, sorry. The only thing that could possibly detect the long press of a volume button is foreground activity. It also assumes that the device has the volume buttons of the hardware, and not all devices.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -