onCreate {
val prefs = Preferences()
val ec = prefs.executionCount(0)
prefs.executionCount = ec + 1
if (ec % 20 == 19 && !prefs.wontRate(false)) {
new AlertDialogBuilder(null, "Please take a moment to rate it.") {
positiveButton("Rate it", {
openUri("market://details?id=com.soundcorset.client.android")
prefs.wontRate = true
})
neutralButton("Remind me later")
negativeButton("No thanks", {
prefs.wontRate = true
})
}.show()
}
}
Comparing with the original code, this is really simple, isn't it?
No comments:
Post a Comment