Nonstop Kotlin SDK
Getting Task Details
There are some scenarios where the containing Client needs to know what is on offer to the user for completing a given task.
The main example of this is in order to present the correct information to logged out users in marketing scenarios such as on-boarding.
The Client application can call Nonstop with a given task type:
Nonstop.getTaskDetails(TaskType.SIGN_UP)
.doOnSubscribe {
// Track disposable
disposables.add(it)
}.subscribe({ taskDetails ->
// Details of the Task
}, {
// Something went wrong
})
The taskDetails response has the following properties:
pointsAvailable: Int- The number of points the user would receive for completing that TaskpointsAvailableDisplay: String- The number of points the user would receive for completing that Task, correctly formatted for display to the user.animationView: LottieAnimationView?- The animation to integrate into your UI