0 Replies Latest reply on Jul 27, 2018 5:31 PM by ANDRES PIZARRO

    Readers class doesn´t found a device

    ANDRES PIZARRO

      Hello,

       

      I´m trying to connect to RFID Reader 8500 through "RFIDAPI3Library" but when I use the Class Readers it doesn´t found any device.

      My code is like this:

       

      import android.os.AsyncTask;

      import android.support.v4.app.Fragment;

      import android.support.v7.app.AppCompatActivity;

      import android.os.Bundle;

       

      import com.zebra.rfid.api3.ENUM_TRANSPORT;

      import com.zebra.rfid.api3.InvalidUsageException;

      import com.zebra.rfid.api3.OperationFailureException;

      import com.zebra.rfid.api3.ReaderDevice;

      import com.zebra.rfid.api3.Readers;

      import java.util.ArrayList;

      import com.zebra.rfid.api3.RFIDReader;

       

      public class MainActivity extends AppCompatActivity implements Readers.RFIDReaderEventHandler {

       

         @Override
         protected void onCreate(Bundle savedInstanceState) {

         super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

       

        Readers readers= new Readers(this, ENUM_TRANSPORT.BLUETOOTH);

      (I change this variable to "ENUM_TRANSPORT.SERVICE_SERIAL" but it throw another Exception)

       

        ArrayList<ReaderDevice> availableRFIDReaderList = null;

         try {

        availableRFIDReaderList = readers.GetAvailableRFIDReaderList();

        ReaderDevice readerDevice = availableRFIDReaderList.get(0);

       

        RFIDReader rfidReader = readerDevice.getRFIDReader();

        rfidReader.connect();

        } catch (InvalidUsageException e) {

        e.printStackTrace();

        } catch (OperationFailureException e) {

        e.printStackTrace();

        }catch (RuntimeException e){

        e.printStackTrace();

        }

        }

         @Override
         public void RFIDReaderAppeared(ReaderDevice readerDevice) {

       

        }

         @Override
         public void RFIDReaderDisappeared(ReaderDevice readerDevice) {

       

        }

      }

       

      With ENUM_TRANSPORT.BLUETOOTH it founds zero device

      With ENUM_TRANSPORT.SERVICE_SERIAL it throw "RFID service is not installed or available Failure in resolving dependency"

       

      The Zebra RFID Reader device is already paired with the phone.

       

      Please, I need some help because is hard to find solutions about this on web and when I run the program in the app "Zebra RFID API Mobile"  it throws the same Exception.

       

      Thank you very much for your answers.