Skip to content

Latest commit

 

History

History

external-websocket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

external-websocket

Support for external NFC readers over websocket.

  • connect/disconnect
  • borrow/unborrow reader (from a pool)
  • start/stop polling
  • tag detected
  • tag lost
  • ADPU commands

This module is primarily intended as a test artifact; it hosts a service with the above controls. A android unit test connects to the service and issue controls; the application under test in turn see

  • service started
  • reader connected
  • card present

and can interact with the card. Note that this allows for a card to be (permanently) placed on the reader and detected anew on demand.

service.connectReader(new String[]{"ACR1252", "MifareDesfireEV1"});

service.beginPolling();

// your assertions here

service.endPolling();

service.disconnectReader();

service.disconnect();

See WebsocketReaderTest with nfc-websocket-server-java-app for a full example.