Code example for ConnectivityManager

Methods: getBackgroundDataSetting

0
    connectivityManager = (ConnectivityManager)a.getSystemService(Context.CONNECTIVITY_SERVICE);
  } 
 
  @Override 
  public void performRequest(final RequestDescription description) {
    if (connectivityManager.getBackgroundDataSetting()) {
      bind(); 
      registerListener(); 
      super.performRequest(description);
    } 
  } 
 
  @Override 
  protected void doRequest(final RequestDescription description) {
    try { 
      if (DEBUG) { Log.d(TAG, "Perform " + description.getOperationCode()); }
      serviceObject.performRequest(description);
    } catch (final RemoteException e) {
      Log.e(TAG, "Cannot perform operation " + description.getOperationCode(), e);
    } 
  }