Configuration and Setup
1
Accessing the SDK Instance
For developers seeking to integrate Quicko Connect into their platforms, the primary point of interaction is through the QuickoSDK class. This class acts as the gateway to the plethora of features and functionalities that Quicko Connect offers.The class is designed as a singleton. This ensures that there’s only one instance of the class throughout the application’s lifecycle, maintaining data consistency and preventing potential issues that could arise from having multiple instances.Here are the ways you can access the SDK on different platforms:
- Java
- Kotlin
- Swift
2
Configuring the API Key (in case of intent `connect`)
Overview
To ensure proper initialization and functioning of the SDK, it’s imperative to configure the API key using the
setAPIKey method. This step must be completed prior to invoking any other operations.- Java
- Kotlin
- Swift
apiKey: A string parameter that represents the API key you’ve been provided with.
Handling Exceptions
Handling Exceptions
IllegalArgumentException
An exception will be raised if the API key supplied to the SDK is invalid or does not adhere to the expected format.
- Java
- Kotlin
- Swift
IllegalArgumentException is triggered, and the error message “Error encountered: Invalid API Key.” gets displayed.Best Practices
Best Practices
Implementing a try-catch mechanism around the
setAPIKey function is advisable. This allows for efficient exception handling, ensuring users receive pertinent feedback or assisting developers during the debugging process.