0

In my android app based on connection type (wifi, data plan and one more option) I am displaying an icon on the screen.

I am able to get whether wifi is enabled or not, but I don't know how to get info on whether the data plan is enabled or not. How do I do this?

I need to know continuously whether wifi is enabled or data plan is enabled. If wifi is enabled after some time it may disconnect, in which case I need check whether the data plan is enabled or not. Based on the connection type I need to change icon on one of my screen in my app.

Shawn Chin
  • 84,080
  • 19
  • 162
  • 191
  • possible duplicate of [how to check wifi or 3g network is available on android device](http://stackoverflow.com/questions/3262781/how-to-check-wifi-or-3g-network-is-available-on-android-device) – Shawn Chin Oct 24 '11 at 13:17

1 Answers1

0

Try listening to CONNECTIVITY_ACTION

Take a look at these questions for more details:

Network listener Android

How can I monitor the network connection status in Android?

Community
  • 1
  • 1
timoschloesser
  • 2,790
  • 4
  • 25
  • 33