Setup your development
Learn how to integrate the truemetrics Android SDK into your app. The other sections of this document describe in detail how to integrate and use the SDK in your application.Get your SDK API key
For using the SDK to upload data from the integrating app (e.g. your driver app), an API key is required. The integrating app has to set this api key (called SDK API KEY) in the initialization of the SDK (see also here in the documentation). If you only want to make some first upload tests, you can use our demo SDK API KEYMSgcfnGu0p3E2KhFwTP3N5NSrCSXm54U6DI0PW51
How to integrate the SDK for native apps
Clone the demo application
To ensure a smooth integration in your app, we prepared a sample integration with a basic demonstrator just for you. You can find this repository here. Just clone the repository locally, by following these instructions in your terminal. Just run or deploy the application in your favorite IDE.Prepare the SDK integration
Integrate the SDK into your app by following these steps:- Read the documentation of the SDK interface.
- Think about, when your app requires to initialize the truemetrics SDK. Typically this is done when the integrating App is started.
- Think about, when to start and stop the SDK. This could be for example when the driver starts a new delivery or starts with his route. Or it could be just the whole shift of a driver.
How to integrate the SDK for React Native apps
We have also prepared a React Native demo app to show how to integrate our SDK. You can find it here. There is a native module calledTruemetricsSdkModule
in the android
module of React Native demo app. TruemetricsSdkModule
handles interaction with the SDK.