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