title: How to detect the current charging state in android
body: <p>I am new in android. I want to make an app with a service. The service should continuously check the current charging state(Plugged or not). And I want to perform an event(Turn wifi off) when the charger is connected. Can you please solve my problem?</p>