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

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

Вопрос

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 ?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top