Trying to follow the google tutorial for in-app reviews and I'm currently stuck with the following piece of code:
val request = manager.requestReviewFlow()
request.addOnCompleteListener { task ->
if (task.isSuccessful) {
// We got the ReviewInfo object
val reviewInfo = task.result
} else {
// There was some problem, log or handle the error code.
@ReviewErrorCode val reviewErrorCode = (task.getException() as TaskException).errorCode
}
}
When I copy this into my IDE, it doesn't seem to pick up the TaskException. What could I rather use here as an alternative ?
I've added:
implementation 'com.google.android.play:core:1.10.0'
implementation 'com.google.android.play:core-ktx:1.8.1'