What's Changed
- Refactor the SDK allow the creating of multiple Offerwall instances
- Deprecate old way of initialisation.
- Optimise UI by using Jetpack Compose
Breaking
- Increase the minSdk to 21
New Offerwall usage:
// Create the instance
val offerwall = BitLabs.OFFERWALL.create("APP_TOKEN", "UID")
// Add tags
offerwall.tags["is_premium"] = true
// Add additional option
offerwall.options["theme"] = "dark"
// Add onSurveyRewardListener, triggered on every reward received from a survey
offerwall.onSurveyRewardListener = OnSurveyRewardListener { reward ->
// implementation
}
// Add onOfferwallClosedListener, triggered when the offerwall is closed
offerwall.onOfferwallClosedListener = OnOfferwallClosedListener { reward ->
onRewardListener?.onOfferwallClosed()
}
// launch the offerwall
offerwall.launch(activityContext)
New API usage
BitLabs.API.getSurveys(OnResponseListener, OnexceptionListener)
BitLabs.API.checkSurveys(OnResponseListener, OnexceptionListener)
Full Changelog: 3.2.28...4.0.0