1. Download our Official Android App: Forums for Android!

Apps Turn ON/OFF WIFI from my app

Discussion in 'Android Development' started by Dramarenko, Oct 5, 2010.

  1. Dramarenko

    Dramarenko Active Member
    Thread Starter
    36

    Oct 5, 2010
    32
    1
    36
    Web Design
    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! ;)
     

    Advertisement

  2. Swizz

    Swizz Well-Known Member
    78

    Nov 10, 2008
    730
    95
    78
    Portland, OR
    Menu>Settings>Wireless Controlls>Wifi Settings>Menu>Advanced>Wifi Sleep Policy
     
  3. Dramarenko

    Dramarenko Active Member
    Thread Starter
    36

    Oct 5, 2010
    32
    1
    36
    Web Design

    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:
     
  4. Dramarenko

    Dramarenko Active Member
    Thread Starter
    36

    Oct 5, 2010
    32
    1
    36
    Web Design
    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 Files:

Share This Page

Loading...