Hi, I have tried setCustomCondition() and setCustomConditionToShowAgain(), but none of them worked.
...
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AppRating.Builder(this)
.setCustomCondition {
true
}
.setCustomConditionToShowAgain {
true
}
.showIfMeetsConditions()
}
...
2021-04-20 15:28:10.285 1348-1348/net.hikingbook.hikingbook D/awesome_app_rating: Custom condition set. This condition will be removed next time you call the Builder constructor.
2021-04-20 15:28:10.285 1348-1348/net.hikingbook.hikingbook D/awesome_app_rating: Custom condition to show again set. This condition willbe removed next time you call the Builder constructor.
2021-04-20 15:28:10.285 1348-1348/net.hikingbook.hikingbook D/awesome_app_rating: App launch will be counted: countAppLaunch is true.
2021-04-20 15:28:10.292 1348-1348/net.hikingbook.hikingbook V/awesome_app_rating: Increased launch times by 1. It's now 7.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook I/awesome_app_rating: Checking conditions.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook V/awesome_app_rating: Is dialog agreed: false.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook V/awesome_app_rating: Do not show again: false.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook D/awesome_app_rating: Show later button has already been clicked.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook V/awesome_app_rating: Days between later button click and now: 0.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook I/awesome_app_rating: Custom condition to show again found. Condition result is: true.
2021-04-20 15:28:10.293 1348-1348/net.hikingbook.hikingbook I/awesome_app_rating: Don't show rating dialog: Conditions not met.
fun shouldShowDialog(context: Context, dialogOptions: DialogOptions): Boolean {
...
if (!checkCustomCondition(dialogOptions)) return false
RatingLogger.verbose("Days between first app start and now: $daysBetween.")
RatingLogger.debug("Show later button hasn't been clicked until now.")
return (!isDialogAgreed &&
!isDoNotShowAgain &&
daysBetween >= PreferenceUtil.getMinimumDays(context) &&
(PreferenceUtil.getLaunchTimes(context) >= PreferenceUtil.getMinimumLaunchTimes(context)))
}