tags:

views:

28

answers:

1

hi,

I want to develop an application that will periodically check whether Wi-Fi is enabled in android and depending on on the result it will take an action. Can anyone give me some suggestions regarding this?

Thanks kaisar

+1  A: 

I think you would better implement a BroadcastReceiver listening to WifiManager.NETWORK_STATE_CHANGED_ACTION system intents.

This way you don't drain battery with unnecessary system wakeup for starting your periodic service, and you are guaranteed to track all wifi state changes.

Kevin Gaudin
Thanks a lot ..
kaisar