@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(name); dest.writeStrongBinder(readerControl.asBinder()); }
public boolean clearDisplay() { byte[] response; try { response = readerControl.clearDisplay(); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
@Override public byte[] control(int slotNum, int controlCode, byte[] command) { byte[] response; try { response = readerControl.control(slotNum, controlCode, command); } catch (RemoteException e) { throw new AcrReaderException(e); } return readByteArray(response); }
public List<AcrPICC> getPICC() { byte[] response; try { response = readerControl.getPICC(); } catch (RemoteException e) { throw new AcrReaderException(e); } int operation = readInteger(response); ArrayList<AcrPICC> values = new ArrayList<AcrPICC>(); if((operation & POLL_ISO14443_TYPE_B) != 0) { values.add(AcrPICC.POLL_ISO14443_TYPE_B); } if((operation & POLL_ISO14443_TYPE_A) != 0) { values.add(AcrPICC.POLL_ISO14443_TYPE_A); } return values; }
public boolean lightDisplayBacklight(boolean value) { byte[] response; try { response = readerControl.lightDisplayBacklight(value); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public String getFirmware() throws AcrReaderException { byte[] response; try { response = readerControl.getFirmware(); } catch (RemoteException e) { throw new AcrReaderException(e); } return readString(response); }
public List<AcrAutomaticPICCPolling> getAutomaticPICCPolling() { byte[] response; try { response = readerControl.getAutomaticPICCPolling(); } catch (RemoteException e) { throw new AcrReaderException(e); } return AcrAutomaticPICCPolling.parse(readInteger(response)); }
public List<AcrDefaultLEDAndBuzzerBehaviour> getDefaultLEDAndBuzzerBehaviour() { byte[] response; try { response = readerControl.getDefaultLEDAndBuzzerBehaviour(); } catch (RemoteException e) { throw new AcrReaderException(e); } return parseBehaviour(readInteger(response)); }
public boolean setAutomaticPICCPolling(AcrAutomaticPICCPolling ... types) { byte[] response; try { response = readerControl.setAutomaticPICCPolling(AcrAutomaticPICCPolling.serialize(types)); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean displayText(AcrFont font, int style, int line, int position, byte[] message) throws AcrReaderException { if(line < 0) { throw new IllegalArgumentException("Expected non-negative line index"); } if(position < 0) { throw new IllegalArgumentException("Expected non-negative position index"); } if(line >= font.getLines()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLines() + " lines"); } if(position + message.length > font.getLineLength()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLineLength() + " chars per line"); } if(style != Typeface.BOLD && style != Typeface.NORMAL) { throw new IllegalArgumentException("Only font styles " + Typeface.NORMAL +" and " + Typeface.BOLD + " supported"); } byte[] response; try { response = readerControl.displayText(font.getId(), style == Typeface.BOLD, line, position, message); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }