• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Turn ON/OFF WIFI from my app

Dramarenko

Newbie
Hi Guys

I want to turn on/off the wifi from my app to save battery. (Because when i press the "power button" the screen is off but the WIFI is still connected and consuming battery.)

I've a Webview app and i will add a menu with follow options:

  • WIFI ON/OFF
  • Open WIFI Settings
How can i do this?

Maybe an other wifi icon in the Android toolbar that when i push down the wifi is on/on? this app already exist?

Have you a better idea? help me! ;)
 
Menu>Settings>Wireless Controlls>Wifi Settings>Menu>Advanced>Wifi Sleep Policy


Thanks Swizz! I'will try it right now. This will solve my problem of battery. But my app will be loaded after android boot as home replacement. i'm still need access to WIFI settings. how can i call the wifi manager from my app? :rolleyes:
 
Menu>Settings>Wireless Controlls>Wifi Settings>Menu>Advanced>Wifi Sleep Policy

Hi Swizz. Thanks for your tip. I do it and this is the list of computers connected in my home.

I've pressed the power button of my Eken pad and the screen is off but still appar connected
(see in red):

Maybe you mean hibernate? of this looks like a firmware/os bug? Or i did something wrong?
 

Attachments

  • Untitled-4.jpg
    Untitled-4.jpg
    185.9 KB · Views: 41
Back
Top Bottom