Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Last active September 11, 2020 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifucolo/9b826d6e64bfb1df311d79f06014427c to your computer and use it in GitHub Desktop.
Save ifucolo/9b826d6e64bfb1df311d79f06014427c to your computer and use it in GitHub Desktop.
//Não esquecer de verificar se é o device utilza Android 5.0 ou mais
//se seu app tiver minSdk < 21
val request = reviewManager.requestReviewFlow()
request.addOnCompleteListener { result ->
if (request.isSuccessful) {
// We got the ReviewInfo object
val reviewInfo: ReviewInfo = result.result
val flow = reviewManager.launchReviewFlow(this, reviewInfo)
flow.addOnCompleteListener {
//Faça algo se necessário
}
} else {
//Pode chamar o jeito antigo
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment