Detect Camera button in sleep mode
<p>Is there anyway to detect hthe camera button in Sleep mode? I tried the examples explained in this forum, but nothing works in Sleep mode.. I am llooking for this for a long time, but no proper answers..</p>

<p><a href="http://stackoverflow.com/questions/7924241/how-i-can-receive-hardware-key-events-in-sleep-mode">How I can receive hardware key events in sleep mode?</a></p>

<p>Please help me...</p>

<pre><code>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 Manifest :

&lt;receiver android:name="YourBoardcastReceiver"&gt;
                &lt;intent-filter&gt;
                        &lt;action android:name="android.intent.action.SCREEN_ON" /&gt;
                &lt;/intent-filter&gt;
&lt;/receiver&gt;
</code></pre>
