How to detect whether screen is on or off if API level is 4?
<p>I am wondering to know how to detect screen dim or brightness on Android 1.6.</p>

<p>I've found a solution on API Level 7. It is easy to develop :</p>

<pre><code>PowerManager pm = (PowerManager)
getSystemService(Context.POWER_SERVICE);
boolean isScreenOn = pm.isScreenOn();
</code></pre>

<p>But I need a solution for Android 1.x.</p>

<p>Can you suggest me ?</p>

<p>Thanks.</p>
