レビューダイアログ表示
以下の手順となります。
・ライブラリ導入して使う
・ダイアログ表示タイミングコンフィグレーションする
ライブラリ導入
**1.dependencies に追加する **
implementation 'com.vorlonsoft:androidrate:1.2.5-SNAPSHOT'

ライブラリ使う
1. 表示したいクラスでインポートする
import com.vorlonsoft.android.rate.*

2. レビューダイアロ作成する
AppRate.with(this)
3. ダイアログ出るタイミングをコンフィグレーションする
下の設定なら、この条件になります。
アプリインストールした後、5回起動し20日以上時にダイアログが出る。
「また今度」ボタン押した後、5回起動し20日以上時にダイアログが出る。
「レビューしない」または「レビューする」押した後、ダイアログが出ない。
.setStoreType(StoreType.GOOGLEPLAY)
.setTimeToWait(Time.DAY, 10)
.setLaunchTimes(3)
.setRemindTimeToWait(Time.DAY,20)
.setRemindLaunchesNumber(5)
.setSelectedAppLaunches(1)
.setShowLaterButton(true)
.setVersionCodeCheck(false)
.setVersionNameCheck(false)
.setDebug(false)
.setCancelable(false)
.setTitle(R.string.new_rate_dialog_title)
.setTextLater(R.string.new_rate_dialog_later)
.setMessage(R.string.new_rate_dialog_message)
.setTextNever(R.string.new_rate_dialog_never)
.setTextRateNow(R.string.new_rate_dialog_ok)
.monitor()

4. ダイアログのボタンクリックイベント追加
AppRate.with(this).setOnClickButtonListener(object: OnClickButtonListener {
override fun onClickButton(which:Byte) {
if(which.toString().equals(RATE)) {
//inApp_レビューする
} else if(which.toString().equals(RATE_LATER)) {
} else if(which.toString().equals(RATE_NEVER)) {
//nApp_レビューしない
}
}
})

5. コンフィグレーションした設定と合わせる時に表示するため
if (AppRate.with(this).getStoreType() == StoreType.GOOGLEPLAY) { // Checks that current app store type from library options is StoreType.GOOGLEPLAY
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) != ConnectionResult.SERVICE_MISSING) { // Checks that Google Play is available
AppRate.showRateDialogIfMeetsConditions(this) // Shows the Rate Dialog when conditions are met
}
} else {
AppRate.showRateDialogIfMeetsConditions(this) // Shows the Rate Dialog when conditions are met
}
