Search code examples
androidandroid-broadcast

Broadcast Receiver every 5 minutes to get wifi signal


friends

I m pretty new here and for android as well. I would like to know is it possible or not to get Wifi signal every 5 -10 minutes, I have heard we can use broadcast receiver but I don't know is it okay or not to refresh every 5 or 10 minutes

Thank you


Solution

  • You have two options for that, you can taste the abstract status of the network to get information if you are connected or not and if it's mobile or WiFi using ConnectivityManager, describe in details in this android article.

    Or you can use the WifiManager, that allows you to:

    For part of the operations you will have to request