After screen is off in 5 minutes wifi is disabled.
<p>I have found good tutorial to for Handling Screen OFF and Screen ON Intents:
<a href="http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/" rel="nofollow">http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/</a></p>

<p>but i want that after screen is off in 5 minutes wifi is disabled.</p>

<pre><code>WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wm.setWifiEnabled(true);
</code></pre>

<p>My only problem is how to achive 5 minutes interval? Do I need some timepickers or what is best practice for this when you are dealing with calculating and counting time?</p>
