Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old October 5th, 2010, 06:12 PM   #1 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Oct 2010
Posts: 32
 
Device(s): Eken M002
Carrier: Not Provided

Thanks: 3
Thanked 1 Time in 1 Post
Smile Turn ON/OFF WIFI from my app

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!

Advertisements
Dramarenko is offline  
Reply With Quote
sponsored links
Old October 5th, 2010, 06:23 PM   #2 (permalink)
Senior Member
 
Swizz's Avatar
 
Join Date: Nov 2008
Location: Portland, OR
Posts: 730
 
Device(s): G2
Carrier: Not Provided

Thanks: 5
Thanked 93 Times in 69 Posts
Default

Quote:
Originally Posted by Dramarenko View Post

Have you a better idea? help me!
Menu>Settings>Wireless Controlls>Wifi Settings>Menu>Advanced>Wifi Sleep Policy
Swizz is offline  
Reply With Quote
Old October 5th, 2010, 06:42 PM   #3 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Oct 2010
Posts: 32
 
Device(s): Eken M002
Carrier: Not Provided

Thanks: 3
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Swizz View Post
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?
Dramarenko is offline  
Reply With Quote
Old October 5th, 2010, 06:57 PM   #4 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Oct 2010
Posts: 32
 
Device(s): Eken M002
Carrier: Not Provided

Thanks: 3
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Swizz View Post
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?
Attached Images
File Type: jpg Untitled-4.jpg (185.9 KB, 5 views)
Dramarenko is offline  
Last edited by Dramarenko; October 5th, 2010 at 07:01 PM.
Reply With Quote
Reply
Tags
battery, manager, php, toolbar, webview, wi-fi, wifi


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:12 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.