public class SAMManager extends EMDKBase
Example Usage: public class MainActivity extends Activity implements EMDKListener, StatusListener, DataListener, ScannerConnectionListener { //@Override protected void onCreate(Bundle savedInstanceState) { //... EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this); } //@Override public void onOpened(EMDKManager emdkManager) { this.emdkManager = emdkManager; //... samManager = (SAMManager)this.emdkManager.getInstance(FEATURE_TYPE.SAM); //... List<SAM> connectedSAMList = samManager.enumerateSAMs(); SAM sam = connectedSAMList.get(0); SAM sam = connectedSAMList.get(0); SAMType samType = sam.getSamType(); SAMType SAMStatus = sam.getSamStatus(); sam.connect(); sam.transceive(byte[],short,boolean); sam.disconnect(); //.. EMDKManager.release(FEATURE_TYPE.SAM); } }
Modifier and Type | Method and Description |
---|---|
java.util.List<SAM> |
enumerateSAMs()
Returns list of connected SAMs.
|
int |
getActiveSlot()
Returns the index of currently connected SAM
This method is useful to identify the current active slot and take decision whether to continue with the same slot or switch to a another slot based on the detected card.
|
public java.util.List<SAM> enumerateSAMs() throws SAMException
SAMException
public int getActiveSlot() throws SAMException
SAMException