Android Question start service when wifi is connected ?

Devv

Active Member
Licensed User
Is it possible to start service when wifi is connected without the help of any other service ?
 

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

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 ?
 

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

Active Member
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
Ok bro i'll do my best then i'll feed back , thanks
 
  • Like
Reactions: udg
Top