The epotheke SDK is a Kotlin Multi-Platform (KMP) library implementing the client side of the CardLink protocol. It takes care of the communication with the CardLink service and the handling of the eHealth card.
Demo applications for native android and ios apps can be found in folders:
The latest documentation can be found at https://mvn.ecsec.de/repository/data-public/epotheke/sdk/doc/latest/.
The epotheke SDK provides an API which can be integrated directly using the SdkCore
class.
This class needs to be instantiated and given the following:
cardLinkUrl
the url of the CardLink service to usetenantToken
a JWT provided by the service provider, for environments allowing non-authenticated acces it can be null- implementation of
CardLinkControllerCallback
for providing the CardLink result and protocols for subsequent processes (e.i. Prescription retrieval/selection) - implementation of
CardLinkInteraction
for exchanging data between the user and the CardLink service - implementation of
SdkErrorHandler
for handling errors related to the SDK initialisation - iosOnly: implementation of
IOSNFCOptions
for defining messages during NFC communications
After the initialisation the method initOecContext()
on android or doInitCardLink()
can be called to start the process.
On android, it is possible to extend the abstract SdkActivity class as it is done in demo-android-standalone. The abstract class already handles life-cycle hooks needed for NFC communications. If this class is not used, please refer to its implementation which hooks have to be called.
For details on how to configure your app project, refer to the manual.
Before building the SDK, it is necessary to setup the android SDK either directly or together with Android Studio.
Make sure to set the ANDROID_HOME
variable as explained here.
In order to build the SDK for use in an app, it can be published to the local maven repository with the following command:
./gradlew publishToMavenLocal
After successful execution of the command, the SDK can be used as shown in the demo application. The version of the SDK is defined in the gradle.properties file.
The epotheke SDK uses a Dual Licensing model. The software is always distributed under the GNU General Public License v3 (GPLv3). Additionally, the software can be licensed in an individual agreement between the licenser and the licensee.