Set Up for Platform Development with Kotlin Android Apps
Updated: Jan 6, 2026
This guide will walk you through the basics of setting up your Android
development environment and initializing the platform.
Prerequisites
Before you can integrate the Horizon Platform SDK for Android Kotlin, you’ll
need to create an app, get the associated App ID, and use the App ID when
configuring your development environment. To create an app, see the information
on the Creating and Managing Apps page.
From the left-side navigation, click Development > API. You’ll find
your App ID in the middle of the API page. You’ll need your App ID to
call the initialization APIs described in the next few sections.
From the left-side navigation, click Distribution > Builds.
Open any build from the list of builds. You’ll find your Package Name in
the middle of the Build Details page.
Create an Android project
Open Android Studio
Select File > New > New Project
Select the “Empty Activity” template
Click “Next”
Fill the Project Settings
In Name, input a value such as “notification”
In Package Name, input the value from Prerequisites, such as “horizon.platform.sample.notification”
In Minimum SDK, select API 35 Android 15.0
In Build configuration language, select Kotlin DSL
Click Finish
Wait a few seconds until the project creation is completed
In the top left, there is a dropdown menu with Android as current value,
select Project so you can see all the files in the project
Use Kotlin 2.1
Open the file ./gradle/libs.versions.toml
In the versions section, replace the version of the following libraries:
[versions]
// Find and Replace the version of the following libraries:
activityCompose = "1.9.3"
coreKtx = "1.13.1"
kotlin = "2.1.0"
In the plugins section, add the compose compiler plugin
Find the line “import
horizon.core.android.driver.coroutines.HorizonServiceConnection”. You can
hover over the class name “HorizonServiceConnection” and the package name
“coroutines” to see the JavaDoc contents
In the menu bar, select Build, Generate App Bundles or APKs, Generate APKs
Run the application
Connect the headset to the computer using USB-C cable
In the menu bar, select Build, Generate App Bundles or APKs, Generate APKs
APP_PACKAGE_NAME=horizon.platform.sample.notification
adb shell am start-activity -n "$APP_PACKAGE_NAME/.MainActivity"
Review logcat, you should see similar content
14:21:51.972 MainActivity I Connecting to Horizon Service with valid app id
14:21:51.998 HzServiceConnection D Horizon Platform connection: Start
14:21:52.000 HzServiceConnection D Horizon Platform connection initialization state: horizon.core.android.driver.coroutines.HorizonServiceConnection$InitializationStage$Uninitialized@a71c274
14:21:52.000 HzServiceConnection D Horizon Platform connection starting
14:21:52.008 MainActivity I PlatformSDK is ready!
14:21:52.047 HzServiceConnection D Horizon Platform connection created, getting global session id
14:21:52.048 HzServiceConnection D Horizon Platform connection success!
14:21:52.048 HzServiceConnection D Horizon Platform connection initialization state: horizon.core.android.driver.coroutines.HorizonServiceConnection$InitializationStage$Connected@3564b79
Stop the app
APP_PACKAGE_NAME=horizon.platform.sample.notification
adb shell am force-stop "$APP_PACKAGE_NAME"
You completed project setup for using the Horizon Platform SDK and can start developing your app.