Jump to content


Recommended Posts

par exemple pour voir que mes moyens de connections ont changés j'utilise:

public static void setConnectionListener(Context context){
  BroadcastReceiver mConnReceiver = new BroadcastReceiver() {
     @Override public void onReceive(Context context, Intent intent) {
        boolean noConnectivity = intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
context.registerReceiver(mConnReceiver,new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); }

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...