Develop

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.

Before you begin

How to install

  1. 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)
     }
    
  2. In Android Studio, click File > Sync Project with Gradle Files to install the package.
  3. Click Build > Generate App Bundles or APKs > Generate APKs.
  4. 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.

API reference

See the exact requests and responses in the Platform SDK Application Lifecycle Package.

Test this on Meta Spatial Simulator

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:
These deliver nothing until you send the corresponding simulator event with the Platform SDK command-line interface, which uses adb broadcasts.