Android: keep screen on from widget
<p>I have a home screen widget and I want to add "keep screen on" functionality. So how do I set the flag "FLAG_KEEP_SCREEN_ON" from within an AppWidgetProvider.onReceive method?</p>

<p>From within an activity you would do a </p>

<pre><code>this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
</code></pre>

<p>but I only have a Context object at hand...</p>
