title: BroadCast receiver invoking if screen is off
body: <p>I am doing an app which lock the screen if we shake the phone, I had written the code for screen off,But now the problem is I need a broadcast receiver which checks whether the screen is off or on, how can I do it?</p>