Android Question start service when wifi is connected ?

Discussion in 'Android Questions' started by Devv, Mar 21, 2015.

  1. Devv

    Devv Active Member Licensed User

    Is it possible to start service when wifi is connected without the help of any other service ?
     
  2. udg

    udg Expert Licensed User

    Use a broadcast receiver (static one) to listen for OS wi-fi events.
    When the event occurs, your process is created and the service run. Is this what are you looking for?
     
    Devv likes this.
  3. Devv

    Devv Active Member Licensed User

    May you help me more please ?
    i am not familiar with android dev site and i dont know how to make a static broadcast receiver
    can you give me a small example please ?
     
  4. udg

    udg Expert Licensed User

    First step should be a quick reading from the forum: intent filters tutorial.
    Secondly, use reference to this broadcast intent.

    Try yourself to modify code from the tutorial with intent above then come back to this thread for further assistance. I hope this way to be of more help to you than just putting together some code for a blinded copy&paste.

    udg
     
    Devv likes this.
  5. Devv

    Devv Active Member Licensed User

    Ok bro i'll do my best then i'll feed back , thanks
     
    udg likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice