This app provides a simple scaffold to start building an app with HMKit on Android. These things have been done:
- New Gradle project created in Android Studio
- SDK imported and added to dependencies
- SDK initialised with snippet from the Developer Center
- One example included to send a telematics command to the car
- One example included to send a Bluetooth command to the car
Before running the app, make sure to configure the following in MainActivity.java
:
- Initialise HMKit with a valid
Device Certiticate
from the Developer Center https://developers.high-mobility.com/ - Create an
Access Token
in the car emulator by following the steps at https://high-mobility.com/learn/tutorials/sdk/android/ and paste it in the source code to download anAccess Certificate
from the server.
In the Developer Center, start the linked vehicle's Emulator. Run the app on an Android Virtual Device to send a few commands to the car. The app will display "HMKit Scaffold" on a grey screen; responses to the telematics commands can be found in the logs in Android Studio.
Note that Bluetooth only works on a real device.
If you have questions or if you would like to send us feedback, join our Slack Channel or email us at [email protected].