Upgrading to 4.x from 3.x
Overview
Version 4.0 represents a major update to the Kount Android SDK with significant enhancements and breaking changes.What Changed
Minimum Android API Version
Minimum Android API Version
- 3.x: Minimum API 19 (Android 4.4)
- 4.0+: Minimum API 19 (Android 4.4), but API 29 (Android 10) is recommended for full feature support
- 4.1.0+: Minimum API 20 (JellyBean)
- 4.3.1+: Minimum API 21 (Lollipop)
- 4.3.2+: Minimum API 26 (Oreo)
If your application is not running on a device with Android 10+, you may not get all the features. Features are automatically enabled by the OS version of the device.
Enhanced Data Collection
Enhanced Data Collection
Version 4.0 introduced several new data collection capabilities:
- City-level location information: More granular location data
- Play Store library integration: Utilizes Google Play Store libraries when available
- Enhanced timing metrics: Better performance monitoring
- Android 10 updates: Full support for Android 10 features
- UI element collection: New analytics capabilities (4.1.0+)
API Changes
API Changes
Merchant ID Type Change
Merchant ID Type Change
Session ID Auto-generation
Session ID Auto-generation
Version 4.3.1+
The SDK now automatically generates a session ID when the field is null or empty:client_id and session_id was also updated in 4.3.1.Migration Steps
Update Merchant ID Type
If upgrading to 4.3.1 or later, change your merchant ID from Integer to String:
Add Completion Handlers
Update your collection calls to use the new completion handler pattern (4.3.0+):
Enable Analytics (Optional)
If you want to collect UI analytics (4.1.0+):
Analytics collection defaults to true. Set to false if you don’t want this feature.
Update Play Store Dependencies
Kount recommends including Google Play Store libraries if your app doesn’t already:
Bug Fixes to Be Aware Of
Several bugs were fixed in the 4.x series that may affect behavior:- 4.2.2: Fixed race condition where collection handlers completed before data transmission
- 4.2.4: Fixed memory leak when Analytics flag is off with many Activities
- 4.1.3: Fixed delayed data transmission in SPAs or single-view apps
- 4.1.2: Fixed NullPointer issue with charging cable events
If you’re using 4.2.0 or 4.2.1, upgrade to 4.2.2+ to resolve the race condition.
Breaking Changes Summary
| Version | Breaking Change | Action Required |
|---|---|---|
| 4.3.2 | Minimum API 26 (Oreo) | Update minSdkVersion to 26 |
| 4.3.1 | Merchant ID is String | Change merchant ID type from int to String |
| 4.3.0 | Completion handlers added | Update collectForSession calls to use new handlers |
| 4.1.0 | Minimum API 20 (JellyBean) | Update minSdkVersion to 20 |
| 4.0.0 | Major API changes | Review all changes and test thoroughly |
Need Help?
If you encounter issues during migration:- Check the Troubleshooting guide
- Review the Changelog for detailed version history
- Visit Kount Community for support
- Email [email protected] for direct assistance
