Pregunta

I don't know whether it's possible: I need to register my android app (it's a backgroundservice) to let it know, when the android system is scanning for wlan-hotspots. I don't want to do this manually in my service every 5 minutes because of battery-reasons.

Is there a way to call my service everytime the os is scanning the wlan?

¿Fue útil?

Solución

you need to register broadcast receiver for that with ConnectivityManager.CONNECTIVITY_ACTION action look for this article http://www.krvarma.com/2010/08/android-network-connectivity-broadcastreceiver/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top