ইন্টিগ্রেট ইন-অ্যাপ রিভিউ (ইউনিটি)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই নির্দেশিকাটি বর্ণনা করে যে কীভাবে ইউনিটি ব্যবহার করে আপনার অ্যাপে অ্যাপ-মধ্যস্থ পর্যালোচনাগুলিকে একীভূত করতে হয়। আপনি যদি কোটলিন বা জাভা , নেটিভ কোড বা অবাস্তব ইঞ্জিন ব্যবহার করেন তার জন্য আলাদা ইন্টিগ্রেশন গাইড রয়েছে।
ইউনিটি SDK ওভারভিউ
প্লে ইন-অ্যাপ রিভিউ API হল Play Core SDK পরিবারের অংশ। RequestReviewFlow
এবং LaunchReviewFlow
পদ্ধতি ব্যবহার করে এপিআই ফর ইউনিটি একটি ReviewManager
ক্লাসের প্রস্তাব দেয়। একটি অনুরোধ করার পরে, আপনার অ্যাপ ReviewErrorCode
ব্যবহার করে অনুরোধের স্থিতি পরীক্ষা করতে পারে।
আপনার উন্নয়ন পরিবেশ সেট আপ করুন
OpenUPM-CLI
আপনার যদি OpenUPM CLI ইনস্টল করা থাকে তবে আপনি নিম্নলিখিত কমান্ডের সাহায্যে OpenUPM রেজিস্ট্রি ইনস্টল করতে পারেন:
openupm add com.google.play.review
OpenUPM
ইউনিটি মেনু বিকল্পটি সম্পাদনা > প্রকল্প সেটিংস > প্যাকেজ ম্যানেজার নির্বাচন করে প্যাকেজ ম্যানেজার সেটিংস খুলুন।
প্যাকেজ ম্যানেজার উইন্ডোতে একটি স্কোপড রেজিস্ট্রি হিসাবে OpenUPM যোগ করুন:
Name: package.openupm.com
URL: https://package.openupm.com
Scopes: com.google.external-dependency-manager
com.google.play.common
com.google.play.core
com.google.play.review
ইউনিটি মেনু বিকল্প উইন্ডো > প্যাকেজ ম্যানেজার নির্বাচন করে প্যাকেজ ম্যানেজার মেনু খুলুন।
আমার রেজিস্ট্রি নির্বাচন করতে ম্যানেজার স্কোপ ড্রপ-ডাউন সেট করুন।
প্যাকেজ তালিকা থেকে ইউনিটি প্যাকেজের জন্য Google Play Integrity প্লাগইনটি নির্বাচন করুন এবং Install টিপুন।
GitHub থেকে আমদানি করুন
GitHub থেকে সর্বশেষ .unitypackage
রিলিজ ডাউনলোড করুন।
ইউনিটি মেনু বিকল্প সম্পদ > আমদানি প্যাকেজ > কাস্টম প্যাকেজ নির্বাচন করে এবং সমস্ত আইটেম আমদানি করে .unitypackage
ফাইলটি আমদানি করুন।
রিভিউ ম্যানেজার তৈরি করুন
ReviewManager
এর একটি উদাহরণ তৈরি করুন যা আপনার অ্যাপ এবং Google Play API-এর মধ্যে যোগাযোগ পরিচালনা করে।
using Google.Play.Review;
// Create instance of ReviewManager
private ReviewManager _reviewManager;
// ...
_reviewManager = new ReviewManager();
রিভিউ ইনফো অবজেক্টের জন্য অনুরোধ করুন
আপনার অ্যাপের ব্যবহারকারীর প্রবাহে ভাল পয়েন্ট নির্ধারণ করতে কখন অ্যাপ-মধ্যস্থ পর্যালোচনার অনুরোধ করতে হবে সে সম্পর্কে নির্দেশিকা অনুসরণ করুন যাতে ব্যবহারকারীকে পর্যালোচনার জন্য অনুরোধ জানানো হয় (উদাহরণস্বরূপ, কোনও ব্যবহারকারী একটি গেমের একটি স্তরের শেষে সারাংশ স্ক্রীন খারিজ করার পরে)। যখন আপনার অ্যাপ এই পয়েন্টগুলির একটির কাছাকাছি চলে যায়, তখন একটি অ্যাসিঙ্ক অপারেশন তৈরি করতে ReviewManager
ইনস্ট্যান্স ব্যবহার করুন, যেমনটি নিম্নলিখিত উদাহরণে দেখানো হয়েছে:
var requestFlowOperation = _reviewManager.RequestReviewFlow();
yield return requestFlowOperation;
if (requestFlowOperation.Error != ReviewErrorCode.NoError)
{
// Log error. For example, using requestFlowOperation.Error.ToString().
yield break;
}
_playReviewInfo = requestFlowOperation.GetResult();
কলটি সফল হলে, এপিআই PlayReviewInfo
অবজেক্টটি ফেরত দেয় যা আপনার অ্যাপের ইন-অ্যাপ পর্যালোচনা প্রবাহ চালু করতে হবে। উদাহরণে, অ্যাসিঙ্ক অপারেশন সম্পাদন করার জন্য একটি কোরোটিনের ভিতরে কল করা হয় (এটি প্রধান থ্রেডকে ব্লক করে না)। যেহেতু কলটি অ্যাসিঙ্ক্রোনাসভাবে করা হয়েছে, এতে কয়েক সেকেন্ড পর্যন্ত সময় লাগতে পারে, তাই আপনার অ্যাপটি আপনার ব্যবহারকারী প্রবাহে যেখানে আপনি অ্যাপ-মধ্যস্থ পর্যালোচনাটি দেখাতে চান সেখানে পৌঁছানোর আগে আপনার অ্যাপটিকে কল করা উচিত।
অ্যাপ-মধ্যস্থ পর্যালোচনা প্রবাহ চালু করুন
আপনার অ্যাপটি PlayReviewInfo
ইনস্ট্যান্স পাওয়ার পরে, এটি অ্যাপ-মধ্যস্থ পর্যালোচনা প্রবাহ চালু করতে পারে। মনে রাখবেন যে PlayReviewInfo
অবজেক্টটি শুধুমাত্র সীমিত সময়ের জন্য বৈধ, তাই আপনার অ্যাপটি একটি প্রবাহ চালু করার আগে খুব বেশি অপেক্ষা করা উচিত নয়।
var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);
yield return launchFlowOperation;
_playReviewInfo = null; // Reset the object
if (launchFlowOperation.Error != ReviewErrorCode.NoError)
{
// Log error. For example, using launchFlowOperation.Error.ToString().
yield break;
}
// 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-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Integrate in-app reviews (Unity)\n\nThis guide describes how to integrate in-app reviews in your app using Unity.\nThere are separate integration guides for if you are using [Kotlin or Java](/guide/playcore/in-app-review/kotlin-java),\n[native code](/guide/playcore/in-app-review/native) or [Unreal Engine](/guide/playcore/in-app-review/unreal-engine).\n\nUnity SDK overview\n------------------\n\nThe Play In-App Review API is part of [Play Core SDK](/reference/com/google/android/play/core/release-notes) family. The API for\nUnity offers a [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) class to request and launch the flow using\nthe [`RequestReviewFlow`](/reference/unity/class/Google/Play/Review/ReviewManager#requestreviewflow) and [`LaunchReviewFlow`](/reference/unity/class/Google/Play/Review/ReviewManager#launchreviewflow) methods. After a\nrequest is made, your app can check the status of the request using\n[`ReviewErrorCode`](/reference/unity/namespace/Google/Play/Review#reviewerrorcode).\n\nSet up your development environment\n-----------------------------------\n\n### OpenUPM-CLI\n\nIf you have the [OpenUPM CLI](https://github.com/openupm/openupm-cli#installation)\ninstalled you can install the OpenUPM registry with the following command: \n\n openupm add com.google.play.review\n\n### OpenUPM\n\n1. Open the [package manager settings](https://docs.unity3d.com/Manual/class-PackageManager.html)\n by selecting the Unity menu option\n **Edit \\\u003e Project Settings \\\u003e Package Manager**.\n\n2. Add OpenUPM as a scoped registry to the Package Manager window:\n\n Name: package.openupm.com\n URL: https://package.openupm.com\n Scopes: com.google.external-dependency-manager\n com.google.play.common\n com.google.play.core\n com.google.play.review\n\n3. Open the [package manager menu](//docs.unity3d.com/Manual/upm-ui-install.html) by selecting the Unity\n menu option **Window \\\u003e Package Manager**.\n\n4. Set the manager scope drop-down to select **My Registries**.\n\n5. Select the **Google Play Integrity plugin for Unity** package from the\n package list and press **Install**.\n\n### Import from GitHub\n\n1. Download the latest [`.unitypackage`](//github.com/google/play-in-app-reviews-unity/releases/latest)\n release from GitHub.\n\n2. Import the `.unitypackage` file by selecting the Unity menu option\n **Assets \\\u003e Import package \\\u003e Custom Package** and importing all items.\n\n| **Note:** By downloading and using Google Play Unity Plugins, you agree to the [Play Core Software Development Kit Terms of Service](/guide/playcore#license).\n\nCreate the ReviewManager\n------------------------\n\nCreate an instance of [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) that handles communication between\nyour app and the Google Play API. \n\n using Google.Play.Review;\n\n // Create instance of ReviewManager\n private ReviewManager _reviewManager;\n // ...\n _reviewManager = new ReviewManager();\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,\nafter a user dismisses the summary screen at the end of a level in a game). When\nyour app gets close one of these points, use the [`ReviewManager`](/reference/unity/class/Google/Play/Review/ReviewManager) instance\nto create an async operation, as shown in the following example: \n\n var requestFlowOperation = _reviewManager.RequestReviewFlow();\n yield return requestFlowOperation;\n if (requestFlowOperation.Error != ReviewErrorCode.NoError)\n {\n // Log error. For example, using requestFlowOperation.Error.ToString().\n yield break;\n }\n _playReviewInfo = requestFlowOperation.GetResult();\n\nIf the call is successful, the API returns the [`PlayReviewInfo`](/reference/unity/class/Google/Play/Review/PlayReviewInfo) object\nthat your app needs to launch the in-app review flow. In the example, the call\nis made inside a [coroutine](https://docs.unity3d.com/Manual/Coroutines.html)\nto perform the async operation (this does not block the Main thread). Because\nthe call is made asynchronously, it might take up to a couple of seconds, so\nyour app should make the call before your app reaches the point in your user\nflow where you want to show the in-app review.\n\nLaunch the in-app review flow\n-----------------------------\n\nAfter your app receives the [`PlayReviewInfo`](/reference/unity/class/Google/Play/Review/PlayReviewInfo) instance, it can launch the\nin-app review flow. Note that the `PlayReviewInfo` object is only valid for a\nlimited amount of time, so your app should not wait too long before launching a\nflow. \n\n var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);\n yield return launchFlowOperation;\n _playReviewInfo = null; // Reset the object\n if (launchFlowOperation.Error != ReviewErrorCode.NoError)\n {\n // Log error. For example, using launchFlowOperation.Error.ToString().\n yield break;\n }\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\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."]]