The Display-TAN library takes care of the basic Bluetooth/BLE communication among smartphone and Display-TAN card.
The library helps to integrate the Display-TAN functionality into a smartphone app faster and easier - because the developer does not have to care about the Bluetooth part of Display-TAN.
The interface of the library (i.e., the set of methods offered by the library) was made as easy as possible.
At the moment, a library is offered for iOS only, a library for Android will follow with basically the same functionality.
The iOS library offers the following 4 methods:
Die library is named LibDisplayTAN. Here is an integration example into a minimal app: ViewController.m
generateTAN will look if among the reachable Bluetooth/BLE devices there is a Display-TAN card, and will send the transaction data to the card, and finally will receive the TAN generated by the card.
The syntax/semantics of the transaction data string is described on http://www.display-tan.com/ocra
An example of a call of the method is the following: generateTAN:@"83507112 ~320,00~1399458665_G6HNVF"
generateTAN will return immediately (return code 0: OK, -1: Error) - it only triggers the Bluetooth communication process. In order to follow the progress of the triggered process and to check whether the TAN was successfully received from the card the getStatus method has to be called periodically.
getStatus will return the status of the triggered generateTAN process. The relevant status codes of getStatus are:
The app starts with status 4. When generateTAN is called, the method getStatus will return different status codes until Status code 7 is returned. readTAN sets status back to 4.
readTAN will return the TAN in case generateTAN was fully successful (status code 7).
cancelGenerateTAN will cancel the current generateTAN process (return code 0: OK, -1: Error). This method may be used for a Cancel button.
The method cancelGenerateTAN is not yet available, it will be available in the next version.
Likewise, a return code 1 of the method generateTAN for the special error case ''Bluetooth is turned off'' will be added in the next version.
An Android library will be available soon. It will have the same functionality/interfaces.