How I can receive hardware key events in sleep mode?
I'm writing an application that allows people in danger to call 911. This is how it should work: He (or she) feels danger. He pushes the volume-down key three times. My app calls 911. But I'm facing the following problem: how can I receive a hardward key event in sleep mode ? I've searched Google and other search engines, but can't find anything related. public class YourBoardcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_CAMERA_BUTTON.equals(intent.getAction())) { Intent main = new Intent();// } } } And in your