ইন-অ্যাপ পর্যালোচনাগুলিকে একীভূত করুন (কোটলিন বা জাভা)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
কোটলিন বা জাভা ব্যবহার করে আপনার অ্যাপে অ্যাপ-মধ্যস্থ পর্যালোচনাগুলিকে কীভাবে সংহত করতে হয় তা এই নির্দেশিকাটি বর্ণনা করে। আপনি যদি নেটিভ কোড , ইউনিটি বা অবাস্তব ইঞ্জিন ব্যবহার করেন তবে আলাদা ইন্টিগ্রেশন গাইড রয়েছে৷
আপনার উন্নয়ন পরিবেশ সেট আপ করুন
প্লে ইন-অ্যাপ রিভিউ লাইব্রেরি হল গুগল প্লে কোর লাইব্রেরির একটি অংশ। প্লে ইন-অ্যাপ রিভিউ লাইব্রেরি সংহত করতে নিম্নলিখিত গ্রেডেল নির্ভরতা অন্তর্ভুক্ত করুন।
গ্রোভি
// In your app's build.gradle file:...dependencies{// This dependency is downloaded from the Google's Maven repository.// So, make sure you also include that repository in your project's build.gradle file.implementation'com.google.android.play:review:2.0.2'// For Kotlin users also add the Kotlin extensions library for Play In-App Review:implementation'com.google.android.play:review-ktx:2.0.2'...}
কোটলিন
// In your app's build.gradle.kts file:...dependencies{// This dependency is downloaded from the Google's Maven repository.// So, make sure you also include that repository in your project's build.gradle file.implementation("com.google.android.play:review:2.0.2")// For Kotlin users also import the Kotlin extensions library for Play In-App Review:implementation("com.google.android.play:review-ktx:2.0.2")...}
রিভিউ ম্যানেজার তৈরি করুন
ReviewManager হল সেই ইন্টারফেস যা আপনার অ্যাপকে একটি ইন-অ্যাপ পর্যালোচনা প্রবাহ শুরু করতে দেয়। ReviewManagerFactory ব্যবহার করে একটি উদাহরণ তৈরি করে এটি পান।
আপনার অ্যাপের ব্যবহারকারী প্রবাহে ভাল পয়েন্ট নির্ধারণ করার জন্য কখন অ্যাপ-মধ্যস্থ পর্যালোচনার অনুরোধ করতে হবে সেই নির্দেশিকা অনুসরণ করুন যাতে ব্যবহারকারীকে একটি পর্যালোচনার জন্য অনুরোধ জানানো হয় (উদাহরণস্বরূপ, যখন ব্যবহারকারী একটি গেমের একটি স্তর সম্পূর্ণ করেন)। যখন আপনার অ্যাপ এই পয়েন্টগুলির মধ্যে একটিতে পৌঁছায়, একটি অনুরোধ টাস্ক তৈরি করতে ReviewManager উদাহরণ ব্যবহার করুন। সফল হলে, API ইন-অ্যাপ পর্যালোচনা প্রবাহ শুরু করার জন্য প্রয়োজনীয় ReviewInfo অবজেক্ট ফিরিয়ে দেয়।
কোটলিন
valrequest=manager.requestReviewFlow()request.addOnCompleteListener{task->if(task.isSuccessful){// We got the ReviewInfo objectvalreviewInfo=task.result}else{// There was some problem, log or handle the error code.@ReviewErrorCodevalreviewErrorCode=(task.getException()asReviewException).errorCode}}
জাভা
ReviewManagermanager=ReviewManagerFactory.create(this);Task<ReviewInfo>request=manager.requestReviewFlow();request.addOnCompleteListener(task->{if(task.isSuccessful()){// We can get the ReviewInfo objectReviewInforeviewInfo=task.getResult();}else{// There was some problem, log or handle the error code.@ReviewErrorCodeintreviewErrorCode=((ReviewException)task.getException()).getErrorCode();}});
অ্যাপ-মধ্যস্থ পর্যালোচনা প্রবাহ চালু করুন
ইন-অ্যাপ পর্যালোচনা প্রবাহ চালু করতে ReviewInfo উদাহরণ ব্যবহার করুন। আপনার অ্যাপটি তার স্বাভাবিক ব্যবহারকারী প্রবাহ (যেমন পরবর্তী স্তরে অগ্রসর হওয়া) চালিয়ে যাওয়ার আগে ব্যবহারকারী অ্যাপ-মধ্যস্থ পর্যালোচনা প্রবাহ সম্পূর্ণ না করা পর্যন্ত অপেক্ষা করুন।
কোটলিন
valflow=manager.launchReviewFlow(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.}
জাভা
Task<Void>flow=manager.launchReviewFlow(activity,reviewInfo);flow.addOnCompleteListener(task->{// 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.});
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Integrate in-app reviews (Kotlin or Java)\n\nThis guide describes how to integrate in-app reviews in your app using either\nKotlin or Java. There are separate integration guides if you are using [native\ncode](/guide/playcore/in-app-review/native), [Unity](/guide/playcore/in-app-review/unity) or [Unreal Engine](/guide/playcore/in-app-review/unreal-engine).\n\nSet up your development environment\n-----------------------------------\n\nThe Play In-App Review Library is a part of the [Google Play Core libraries](/guide/playcore).\nInclude the following Gradle dependency to integrate the Play In-App Review\nLibrary. \n\n### Groovy\n\n```groovy\n// In your app's build.gradle file:\n...\ndependencies {\n // This dependency is downloaded from the /studio/build/dependencies#google-maven.\n // So, make sure you also include that repository in your project's build.gradle file.\n implementation 'com.google.android.play:review:2.0.2'\n\n // For Kotlin users also add the Kotlin extensions library for Play In-App Review:\n implementation 'com.google.android.play:review-ktx:2.0.2'\n ...\n}\n```\n\n### Kotlin\n\n```kotlin\n// In your app's build.gradle.kts file:\n...\ndependencies {\n // This dependency is downloaded from the /studio/build/dependencies#google-maven.\n // So, make sure you also include that repository in your project's build.gradle file.\n implementation(\"com.google.android.play:review:2.0.2\")\n\n // For Kotlin users also import the Kotlin extensions library for Play In-App Review:\n implementation(\"com.google.android.play:review-ktx:2.0.2\")\n ...\n}\n```\n\nCreate the ReviewManager\n------------------------\n\nThe [`ReviewManager`](/reference/com/google/android/play/core/review/ReviewManager) is the interface that lets your app start an in-app\nreview flow. Obtain it by creating an instance using the\n[`ReviewManagerFactory`](/reference/com/google/android/play/core/review/ReviewManagerFactory). \n\n### Kotlin\n\n```kotlin\nval manager = ReviewManagerFactory.create(context)\n```\n\n### Java\n\n```java\nReviewManager manager = ReviewManagerFactory.create(context)\n```\n\nRequest a ReviewInfo object\n---------------------------\n\nFollow the guidance about [when to request in-app reviews](/guide/playcore/in-app-review#when-to-request) to determine good\npoints in your app's user flow to prompt the user for a review (for example,\nwhen the user completes a level in a game). When your app reaches one of these\npoints, use the [`ReviewManager`](/reference/com/google/android/play/core/review/ReviewManager) instance to create a request task. If\nsuccessful, the API returns the [`ReviewInfo`](/reference/com/google/android/play/core/review/ReviewInfo) object needed to start the\nin-app review flow. \n\n### Kotlin\n\n```kotlin\nval request = manager.requestReviewFlow()\nrequest.addOnCompleteListener { task -\u003e\n if (task.isSuccessful) {\n // We got the ReviewInfo object\n val reviewInfo = task.result\n } else {\n // There was some problem, log or handle the error code.\n @ReviewErrorCode val reviewErrorCode = (task.getException() as ReviewException).errorCode\n }\n}\n```\n\n### Java\n\n```java\nReviewManager manager = ReviewManagerFactory.create(this);\nTask\u003cReviewInfo\u003e request = manager.requestReviewFlow();\nrequest.addOnCompleteListener(task -\u003e {\n if (task.isSuccessful()) {\n // We can get the ReviewInfo object\n ReviewInfo reviewInfo = task.getResult();\n } else {\n // There was some problem, log or handle the error code.\n @ReviewErrorCode int reviewErrorCode = ((ReviewException) task.getException()).getErrorCode();\n }\n});\n```\n| **Note:** The [`ReviewInfo`](/reference/com/google/android/play/core/review/ReviewInfo) object is only valid for a limited amount of time. Your app should request a `ReviewInfo` object ahead of time (pre-cache) but only once you are certain that your app will launch the in-app review flow.\n\nLaunch the in-app review flow\n-----------------------------\n\nUse the [`ReviewInfo`](/reference/com/google/android/play/core/review/ReviewInfo) instance to launch the in-app review flow. Wait until\nthe user has completed the in-app review flow before your app continues its\nnormal user flow (such as advancing to the next level). \n\n### Kotlin\n\n```kotlin\nval flow = manager.launchReviewFlow(activity, reviewInfo)\nflow.addOnCompleteListener { _ -\u003e\n // The flow has finished. The API does not indicate whether the user\n // reviewed or not, or even whether the review dialog was shown. Thus, no\n // matter the result, we continue our app flow.\n}\n```\n\n### Java\n\n```java\nTask\u003cVoid\u003e flow = manager.launchReviewFlow(activity, reviewInfo);\nflow.addOnCompleteListener(task -\u003e {\n // The flow has finished. The API does not indicate whether the user\n // reviewed or not, or even whether the review dialog was shown. Thus, no\n // matter the result, we continue our app flow.\n});\n```\n| **Important:** If an error occurs during the in-app review flow, do not inform the user or change your app's normal user flow. Continue your app's normal user flow after `onComplete` is called.\n\nNext steps\n----------\n\n[Test your app's in-app review flow](/guide/playcore/in-app-review/test) to verify that your integration is\nworking correctly."]]