how to capture a key event for an emergency button implementation in lock screen state of android

StackOverflow https://stackoverflow.com/questions/15569299

Pregunta

I want it like: Start an emergency activity on, say long press MENU button. Though there is a phone lock. As this is an emergency, on long press MENU button, it will capture the key Event/press and will start the emergency activity defined by the developer. but now the problem is, when there is screen Lock, key-guard will be lock i.e it cant capture any key Event/Press in a phone lock state.

Is there any way to solve this problem ?

¿Fue útil?

Solución

U can't dispatch even when screen is lock but using accelero meter ie by shake u can open screen lock and do what ever u t ...even u start any thing in background

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top