Last active
September 11, 2020 08:34
-
-
Save ifucolo/9b826d6e64bfb1df311d79f06014427c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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