views:

50

answers:

1

Hi guys, there is an Android Intent ACTION_XXX that notify me when Internet Connection is available? I would to instantiate a BroadcastReceiver that notify my application when user enable Internet Connection (by wifi, by GSM, etc...)

Could anyone help me?

+2  A: 
<receiver android:name=".YOURRECEIVER">
   <intent-filter>
      <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
   </intent-filter>
</receiver>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
fedj