open method
Definition:
Parameters
- Platform Specific Param
- Android:
android.content.Context - iOS:
UIViewController
- Android:
- options (Options): An object that configures the SDK’s behavior, user interface, and referral attribution. See the Options Object reference.
ref field of options. Replace YOUR_REF in the examples below with your value. See Affiliates to sign up and create it.
Example Usage:
- Java
- Kotlin
- Swift
Error Handling
Error Handling
IllegalArgumentException
This exception is thrown when the API key has not been set before invoking the
open method, and if your intent is connect.- Java
- Kotlin
- Swift
open method, the IllegalArgumentException will be thrown, and the error message “Error: API Key has not been set.” will be printed.Recommendations
Recommendations
Best Practices
- Always ensure that the API key has been set using the
setAPIKeymethod before invoking theopenmethod. - It’s a good practice to wrap the
openmethod call inside a try-catch block to handle theIllegalArgumentExceptionand provide feedback to the user or log the error for debugging purposes.