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