Android SDK Upgrade Document
Android SDK Upgrade Documentation
This document comprises steps to follow to upgrade the SDK to a newer version.
Version: 10.0.0-RELEASE
From version 10.0.0-RELEASE, we have introduced major changes to our SDK integration process.
This release focuses on size reduction, refactored architecture, and simplified integration.
Why this change?
- Re-architected and optimized the SDK.
- Reduced overall SDK size and improved performance.
- Cleaner and easier-to-maintain architecture.
Current SDK Version : 10.0.0-RELEASE
Step 1: Change the version of the Nuclei SDK version inside the build.gradle
file. Sync the gradle and build the application. All the dependencies version would have to change to the version that is being upgraded to.
For instance,
Current SDK version: 9.2.1-RELEASE
implementation "com.nuclei.sdk:provider-bank:9.2.1-RELEASE"
Upgrading to 10.0.0-RELEASE
implementation "com.nuclei.sdk:provider-bank:10.0.0-RELEASE"
// Note:
// 9.0.0 and above is Android 15 compatible SDK with minSdk = 24
- Do not remove provider-bank dependency. This is a core dependency.
Step 2: Application Class Setup
From this version onwards, setBaseUrl()
is deprecated and should not be used.
Use setEnvironment()
instead.
You can choose from the following environments:
Environment | Description |
---|---|
SdkEnvironment.STAGING | Preproduction / UAT environment |
SdkEnvironment.INDIA_PRODUCTION | Use this for CUG and Production releases in India |
SdkEnvironment.UAE_PRODUCTION | Use this for Production releases in UAE |
Example Implementation:
public class PartnerApplication extends Application {
private NucleiSDK nucleiSDK;
@Override
public void onCreate() {
super.onCreate();
nucleiSDK = NucleiSDK.bind(this)
// Pass the environment directly (refer to above table)
.setEnvironment(SdkEnvironment.STAGING)
// Your partner key
.setKey(selectedPartnerKey)
.setTheme(R.style.nuclei_theme)
.init();
}
}
Any native dependencies other than the ones listed below must be removed:
- Provider Bank
- Synapse (if applicable)
Step 3: Theme Updates (styles.xml
)
We have renamed two attributes in our theme integration. Please update your theme styles accordingly.
// Old (Deprecated)
<item name="tabTextColor">#009fda</item>
<item name="tabIndicatorColor">#009fda</item>
// New (Use from v10.0.0 onwards)
<item name="colorTabText">#009fda</item>
<item name="colorTabIndicator">#009fda</item>
Add a file main/res/values-v35/styles.xml
and add the following configuration:
Note : If already done then ignore
<style name="SampleAppTheme" parent="NucleiSDKTheme">
//Add All styles of SampleAppTheme from main/res/values/style.xml
...
//Add the following configuration
<item name="android:windowLightStatusBar">true</item>
//true -> if colorToolbarBg is light
//false -> if colorToolbarBg is dark
</style>
Step 4: If the bank is integrating any new category and the bank is using their own grid, the bank can launch using the open
Methods.
MyApplication.getNucleiSDK().openRecharge(); //to open Recharge category
MyApplication.getNucleiSDK().openCabs(); //to open Cabs category
MyApplication.getNucleiSDK().openFlights(); //to open Flights category
MyApplication.getNucleiSDK().openHotels(); //to open Hotels category
MyApplication.getNucleiSDK().openBus(); //to open Bus category
MyApplication.getNucleiSDK().openCreditScore(); //to open Bus category
MyApplication.getNucleiSDK().openGiftCard(); // to open GiftCard category
MyApplication.getNucleiSDK().openEvents(); // to open Events category
MyApplication.getNucleiSDK().openCarRental() // to open Car Rental Category
Please test the following scenarios:
-
App Installation & Upgrade
Install the application with Nuclei SDK 10.0.0-Release over an existing installation that has an older SDK version and verify that it works correctly. -
Category Sanity Check
Validate that the categories integrated by the partner are functioning as expected.