Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.12 KB

api-reference.md

File metadata and controls

45 lines (28 loc) · 1.12 KB

Lifecycle API Usage

This document lists the APIs provided by Lifecycle extension, along with sample code snippets on how to properly use the APIs.

For more in-depth information about the Lifecycle extension, visit the official SDK documentation on Lifecycle.

Registering Lifecycle extension

Lifecycle.EXTENSION represents a reference to the LifecycleExtension class that can be registered with MobileCore via its registerExtensions api.

Java
import com.adobe.marketing.mobile.Lifecycle;

MobileCore.registerExtensions(Arrays.asList(Lifecycle.EXTENSION, ...), new AdobeCallback<Object>() {
    // handle callback
});
Kotlin
import com.adobe.marketing.mobile.Lifecycle

MobileCore.registerExtensions(Arrays.asList(Lifecycle.EXTENSION, ...)){
    // handle callback
}

Getting Lifecycle extension version

Java
final String lifecycleExtensionVersion = Lifecycle.extensionVersion();
Kotlin
val lifecycleExtensionVersion: String = Lifecycle.extensionVersion()