activate
Use this method to initialize the Adapty SDK.
If your app starts multiple processes (not always by yourself) don't forget to check main process.
Parameters
context
Application context.
config
An AdaptyConfig object.
fun activate(context: Context, appKey: String, observerMode: Boolean = false, customerUserId: String? = null)
Deprecated
This method has been deprecated. Please use Adapty.activate(context: Context, config: AdaptyConfig) instead
Replace with
import com.adapty.models.AdaptyConfig
Content copied to clipboard
Adapty.activate(context, AdaptyConfig.Builder(appKey).withObserverMode(observerMode).withCustomerUserId(customerUserId).build())
Content copied to clipboard
Use this method to initialize the Adapty SDK.
If your app starts multiple processes (not always by yourself) don't forget to check main process.
Parameters
context
Application context.
appKey
You can find it in your app settings in Adapty Dashboard App settings General.
observerMode
A boolean value controlling Observer mode. Turn it on if you handle purchases and subscription status yourself and use Adapty for sending subscription events and analytics.
customerUserId
User identifier in your system.