Reminder: By Aug 31, 2025, all new apps and updates to existing apps must use Billing Library version 7 or newer. If you need more time to update your app, you can request an extension until Nov 1, 2025. Learn about Play Billing Library version deprecation.
BillingResult প্রতিক্রিয়া কোড পরীক্ষা করুন,BillingResult প্রতিক্রিয়া কোড পরীক্ষা করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
প্লে বিলিং লাইব্রেরি আপনাকে ট্রিগার করা কোনো অ্যাকশনের ফলাফল জানাতে একটি BillingResult প্রতিক্রিয়া প্রদান করে। আরও তথ্যের জন্য, BillingResult প্রতিক্রিয়া কোডগুলি পরিচালনা করা দেখুন। আপনি উত্পাদন পরিবেশে আপনার অ্যাপ স্থাপন করার আগে, আপনি প্রতিক্রিয়া সিমুলেটর ব্যবহার করে আপনার অ্যাপের বিভিন্ন প্রতিক্রিয়া প্রবাহ পরীক্ষা করতে পারেন।
প্রতিক্রিয়া সিমুলেটর
আপনি যখন আপনার অ্যাপকে প্লে বিলিং লাইব্রেরির সাথে সংহত করেন, তখন সমস্ত BillingResponseCode ফ্লো পরীক্ষা করা কঠিন হতে পারে, কারণ Play Store এবং Play এর ব্যাকএন্ডের মধ্যে যোগাযোগের উপর আপনার খুব বেশি নিয়ন্ত্রণ নেই৷ প্লে বিলিং ল্যাব অ্যাপের রেসপন্স সিমুলেটর বৈশিষ্ট্যটি আপনাকে বিভিন্ন জটিল ত্রুটি পরিস্থিতি পরীক্ষা করার জন্য প্লে বিলিং লাইব্রেরির জন্য ত্রুটি কোড প্রতিক্রিয়া কনফিগার করতে দেয়।
প্লে বিলিং লাইব্রেরির জন্য বিলিং ওভাররাইড টেস্টিং সক্ষম করুন
রেসপন্স সিমুলেটর এবং আপনার অ্যাপের মধ্যে যোগাযোগ সক্ষম করতে, আপনাকে অবশ্যই আপনার অ্যাপের মধ্যে থেকে প্লে বিলিং লাইব্রেরির জন্য বিলিং ওভাররাইড টেস্টিং সক্ষম করতে হবে। এটি করতে, আপনার অ্যাপের AndroidManifest.xml ফাইলে নিম্নলিখিত মেটাডেটা ট্যাগ যোগ করুন।
আপনি যখন আপনার অ্যাপটি প্রোডাকশন এনভায়রনমেন্টে স্থাপন করেন, তখন আপনার হয় একটি আলাদা AndroidManifest.xml ফাইল ব্যবহার করা উচিত যাতে এই মেটাডেটা ট্যাগগুলি অন্তর্ভুক্ত নয় অথবা আপনি AndroidManifest.xml ফাইল থেকে এই ট্যাগগুলি সরিয়ে ফেলেছেন তা নিশ্চিত করুন৷
প্লে বিলিং লাইব্রেরি ত্রুটিগুলি অনুকরণ করুন৷
প্লে বিলিং লাইব্রেরি ত্রুটিগুলি অনুকরণ করতে, প্রথমে প্লে বিলিং ল্যাব অ্যাপে প্রতিক্রিয়া কোডগুলি কনফিগার করুন এবং তারপরে আপনার অ্যাপটি পরীক্ষা করুন৷
একটি প্রতিক্রিয়া কোড কনফিগার করুন
Play Billing Lab অ্যাপে, আপনার অ্যাপের জন্য লাইসেন্স পরীক্ষক অ্যাকাউন্ট দিয়ে সাইন ইন করুন। এটি রেসপন্স সিমুলেটর কার্ড সহ প্লে বিলিং ল্যাব ড্যাশবোর্ড প্রদর্শন করে।
প্লে বিলিং লাইব্রেরি APIগুলির জন্য একটি প্রতিক্রিয়া কোড নির্বাচন করুন যা আপনি পরীক্ষা করতে চান৷ আপনার নির্বাচন স্বয়ংক্রিয়ভাবে সংরক্ষিত হয়, এবং প্রতিক্রিয়া সিমুলেটর আপনার অ্যাপে নির্বাচিত প্রতিক্রিয়া কোড পাঠাতে প্রস্তুত।
আপনার অ্যাপের ত্রুটি পরিচালনা পরীক্ষা করুন
আপনার অ্যাপ খুলুন।
আপনি যদি প্লে বিলিং ল্যাব থেকে বিজ্ঞপ্তিগুলিকে অনুমতি দিয়ে থাকেন তবে আপনি আপনার ডিভাইসের স্ট্যাটাস বারে প্লে বিলিং ল্যাব বিজ্ঞপ্তি আইকন দেখতে পাবেন যা রেসপন্স সিমুলেটরের সাথে একটি সফল সংযোগ নির্দেশ করে৷
চিত্র 3. প্লে বিলিং ল্যাব আইকন সফল সংযোগ নির্দেশ করে৷
আপনি যে প্লে বিলিং লাইব্রেরি API পদ্ধতিটি পরীক্ষা করতে চান তা ট্রিগার করুন। উদাহরণস্বরূপ, আপনি launchBillingFlow পরীক্ষা করতে চাইলে, একটি ইন-অ্যাপ ক্রয় প্রবাহ শুরু করুন।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি 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,["# Test BillingResult response codes\n\nThe Play Billing Library returns a [`BillingResult`](/reference/com/android/billingclient/api/BillingResult) response to let you\nknow the outcome of an action that was triggered. For more\ninformation, see [handling `BillingResult` response codes](/google/play/billing/errors). Before you\ndeploy your app to the production environment, you can test your app's various\nresponse flows by using the Response Simulator.\n\nResponse Simulator\n------------------\n\nWhen you integrate your app with the Play Billing Library, it can be difficult\nto test all of the [`BillingResponseCode`](/reference/com/android/billingclient/api/BillingClient.BillingResponseCode) flows, because you don't have much\ncontrol over the communication between the Play Store and Play's backend.\nThe Response Simulator feature in the [Play Billing Lab](https://play.google.com/store/apps/details?id=com.google.android.apps.play.billingtestcompanion) app lets you\nconfigure error code responses for the Play Billing Library to test various complex\nerror scenarios.\n\n### Enable billing overrides testing for the Play Billing Library\n\n| **Note:** Before testing, ensure that your app is using [Play Billing Library](/google/play/billing/integrate#dependency) version 7.1.1 or later.\n\nTo enable communication between the Response Simulator and your app,\nyou must enable billing overrides testing for the Play Billing Library\nfrom within your app. To do this, add the following metadata tags to your app's\n`AndroidManifest.xml` file. \n\n```scdoc\n\u003cmanifest ... \u003e\n \u003capplication ... \u003e\n ...\n \u003cmeta-data\n android:name=\"com.google.android.play.largest_release_audience.NONPRODUCTION\"\n android:value=\"\" /\u003e\n \u003cmeta-data\n android:name=\"com.google.android.play.billingclient.enableBillingOverridesTesting\"\n android:value=\"true\" /\u003e\n \u003c/application\u003e\n\u003c/manifest\u003e\n```\n| **Note:** Even though adding only the `enableBillingOverridesTesting` tag and setting it to `true` is sufficient to enable billing overrides testing for your app, it's recommended that you also add the `NONPRODUCTION` tag. The `NONPRODUCTION` tag prevents accidental deployment of your app to the production environment with billing overrides testing enabled.\n\nWhen you deploy your app to the production environment, you should either\nuse a separate `AndroidManifest.xml` file that doesn't include these\nmetadata tags or ensure that you've removed these tags from the\n`AndroidManifest.xml` file.\n\n### Simulate Play Billing Library errors\n\nTo simulate Play Billing Library errors, first, configure the response codes\nin the [Play Billing Lab](https://play.google.com/store/apps/details?id=com.google.android.apps.play.billingtestcompanion) app, and then test your app.\n\n#### Configure a response code\n\n1. In the Play Billing Lab app, sign in with a [license tester](/google/play/billing/test#license-testers) account for your app.\n This displays the Play Billing Lab **Dashboard** including\n the **Response Simulator** card.\n\n **Figure 1.** Response Simulator card.\n2. Click **Manage** on the Response Simulator card.\n This shows the **Response Simulator** screen.\n\n3. When prompted, allow notifications from Play Billing Lab to see the connection status of your app.\n\n4. Enable the **Simulate Play Billing Library responses** switch, if it isn't\n already enabled.\n\n **Figure 2.** Simulate Play Billing Library responses switch.\n5. Select a response code for the Play Billing Library APIs that you want\n to test.\n Your selections are automatically saved, and the Response Simulator\n is ready to send the selected response codes to your app.\n\n#### Test your app's error handling\n\n| **Note:** When testing using the Response Simulator, ensure that you first open Play Billing Lab, and then open your app. Opening your app before opening Play Billing Lab may result in issues connecting to the Response Simulator.\n\n1. Open your app.\n\n - If you have allowed notifications from Play Billing Lab, you will see the Play Billing Lab notification icon in your device's status bar which indicates a successful connection to the Response Simulator.\n\n **Figure 3.** Play Billing Lab icon indicating successful connection.\n2. Trigger the Play Billing Library API method you want to test. For example,\n if you want to test the `launchBillingFlow`, initiate an in-app purchase\n flow."]]