'How to set the google in-app comment optional?
The in-app dialog is working fine on my device but it's has required comment. the submit button will not be enable if the user does not have inputted a comment. I want the user have only optional comment on the app.
fun inAppReview() {
val reviewManager = ReviewManagerFactory.create(mContext)
val requestReviewFlow = reviewManager.requestReviewFlow()
requestReviewFlow.addOnCompleteListener { request ->
if (request.isSuccessful) {
// We got the ReviewInfo object
val reviewInfo = request.result
val flow = reviewManager.launchReviewFlow(mContext as Activity, reviewInfo)
flow.addOnCompleteListener {
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
}
} else {
Log.d("Error: ", request.exception.toString())
// There was some problem, continue regardless of the result.
}
}
}
Dependencies
implementation 'com.google.android.play:core:1.8.0'
implementation 'com.google.android.play:core-ktx:1.8.1'
Solution 1:[1]
As noted in the answer to a similar question https://stackoverflow.com/a/66568269/7867180: it is required only when you are a tester. Since, it is written "reviews are only visible to developers", it means that you are really the tester. In other cases, it will be optional as stated in docs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | CyxouD |