1 Reply Latest reply on Aug 14, 2015 3:07 PM by Kanagal Raj Ramaswamy

    emdkManager - put to other intent

    Alexey Titov

      Hi!

      I have an application in which one activity launches other (startActivity (intent);). The scanner is used in both, and I have to use onPause and onResume for CleanUp and Initialize EMDK Objects when activity switches.

      @Override

      protected void onPause() {

      super.onPause();

      deInitScanner();

      if (barcodeManager != null)

      barcodeManager = null;

      if (emdkManager != null) {

      emdkManager.release();

      emdkManager = null;

      }

      }

      @Override

      protected void onResume() {

      // TODO Auto-generated method stub

      super.onResume();

      if (emdkManager == null) {

      EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this);

      if (results.statusCode != EMDKResults.STATUS_CODE.SUCCESS) {

      Toast.makeText(InReturnGDSListActivity.this,

      "EMDKManager Error!!!",

      Toast.LENGTH_SHORT).show();

      }

      }

      }

      It is very slow. Can anyone suggest a better solution?

      Thank you!