Application Lifecycle package
Updated: Sep 4, 2026
The
Platform SDK Application Lifecycle Package manages how applications are launched and handles deep linking scenarios. The package retrieves information about launch methods: normal launches, invite-based launches, and deep links. A fourth type, coordinated launches, is deprecated and should not be used in new code.
Applications can log the success or failure of deep linking attempts for analytics purposes and handle launch intent changes during runtime. The package supports various launch types essential for implementing social features and app-to-app navigation.
Add the following to your project’s ./gradle/libs.versions.toml file:
[libraries]
# Existing lines
application-lifecycle-kotlin = { module = "com.meta.horizon.platform.sdk:application-lifecycle-kotlin", version.ref = "horizonPlatformSdk" }
dependencies {
// Existing lines
implementation(libs.application.lifecycle.kotlin)
}
In Android Studio, click File > Sync Project with Gradle Files to install the package.
Click Build > Generate App Bundles or APKs > Generate APKs.
In the “External Libraries” section of your project, confirm that these packages are listed.
com.meta.horizon.platform.sdk:core-kotlin
com.meta.horizon.platform.sdk:application-lifecycle-kotlin
Now you can initialize the Platform SDK and use the Application Lifecycle package functions in your app.
getLaunchDetails and logDeeplinkResult:
These APIs are available on
Meta Spatial Simulator, with one caveat worth knowing before you rely on the result: they return a fixed response rather than evaluating what you send. A call that would fail on a physical device still returns a success response here. Use the simulator to check your integration compiles and handles a response, and confirm the decision itself on a physical device.
launchIntentChanged is a flow, so collect from it first and then send the event, or it stays silent: