این سند به سوالات رایج در مورد SDKها و انتشار برای بازیهای Google Play در رایانه شخصی پاسخ میدهد.
کسب درآمد
چرا پس از افزودن کلید صدور صورتحساب یا مجوز جدید، روند خرید من با خطای کد ۶ مواجه میشود؟
کلیدهای مجوز جدید تولید شده در کنسول گوگل پلی، قبل از اینکه حافظههای داخلی گوگل پلی در تمام محیطهای ارائه دهنده همگامسازی شوند، با تأخیر چند ساعته در ذخیرهسازی و انتشار در بخش پشتیبانی تجاری مواجه میشوند. حتی اگر کلاینت بازی شما بتواند جزئیات محصول را با موفقیت جستجو کند، درخواستهای خرید با کد خطای ۶ تا زمان تکمیل همگامسازی، با شکست مواجه میشوند. قبل از آزمایش خریدها، چند ساعت پس از آپلود یا بهروزرسانی کلید مجوز خود صبر کنید.
آیا میتوانم بدون سرور پشتیبان از جریان خرید استفاده کنم؟
از دیدگاه امنیتی، گوگل استفاده از یک سرور بکاند را توصیه میکند.
برای اطلاعات بیشتر، به فرآیند بدون سرور پشتیبان مراجعه کنید.
آیا سیستمهای پرداخت مبتنی بر API موجود پس از ادغام Google Play Games on PC SDK مجاز هستند؟
تمام پرداختها باید توسط Google Play Games on PC SDK با استفاده از Google Play Billing انجام شود. شما نمیتوانید از روش پرداخت مبتنی بر API موجود خود در همان بازی استفاده کنید.
چگونه میتوانیم خریدها را در حالت توسعهدهنده مصرف کنیم؟
خرید را ظرف ۳ دقیقه در حالت توسعهدهنده انجام دهید، در غیر این صورت وجه خرید به شما بازگردانده خواهد شد.
آیا پرداختهای دورهای یا اشتراکها پشتیبانی میشوند؟
نه برای آیندهی نزدیک، اگرچه میتوانید موارد استفادهی خاص خود را برای اضافه کردن به نقشهی راه آیندهمان ارائه دهید.
خطای صورتحساب (Billing Error) در تماسهای خرید من چیست؟
خطای BillingError پاسخ نتیجه پرداخت است. LaunchPurchaseFlow بلافاصله و بدون مسدود شدن، نتیجه را برمیگرداند، اما شما باید به فراخوانی آن گوش دهید تا بدانید چه زمانی تمام شده و نتیجه را ثبت کنید.
چگونه میتوانم از تأیید خرید سمت کلاینت استفاده کنم؟
ما استفاده از خرید سمت سرور و فرآیند تأیید آن را توصیه میکنیم. پردازش خریدها از برنامه کلاینت شما مستلزم آن است که بازی شما در لیست مجاز باشد. اگر بازی شما نیاز به دسترسی دارد، لطفاً با شریک گوگل خود تماس بگیرید. برای اطلاعات بیشتر، به فرآیند بدون سرور پشتیبان مراجعه کنید.
محدودیتهای API برای جستجوی جزئیات محصول چیست؟
حداکثر تعداد محصولاتی که میتوان در یک فراخوانی به API مربوط به
QueryProductDetailsدرخواست داد، ۵۰ عدد است. اگر از این حد تجاوز کنید، باید درخواست را به چندین فراخوانی تقسیم کنید.چه پارامترهایی هنگام فراخوانی Query Purchases یا Launch Purchase Flow در Billing Client مورد نیاز است؟
این تابع
QueryPurchasesContinuationمیپذیرد که یک فراخوانی تابع با امضایstd::function<void(QueryPurchasesResult)>است. این فراخوانی، نتیجه را به همراه تمام جزئیات خریدProductPurchaseDetails) به شما ارسال میکند. این اطلاعات در فایلهای هدر SDK در فایلincludes/billing/models.hموجود است.تابع ok() در خروجی
launch_purchase_flow_resultدارای توابعok() وcode() است. تابعok() میزان موفقیتآمیز بودن جریان را برمیگرداند. تابعcode() مقدارBillingError(includes/billing/enums.h) را برمیگرداند که دارای 10 حالت خطای احتمالی، مانند لغو توسط کاربر یا خطای شبکه است.آیا سفارش سفارشی برای جریان خرید اولیه در بخش صورتحساب مشتری پشتیبانی میشود؟
در طراحی فعلی SDK، هیچ راهی برای ارسال payload خودتان وجود ندارد. با این حال، میتوانید هر ترکیبی از
obfuscated_account_idوobfuscated_profile_idرا ارائه دهید. میتوانید هیچ کدام، فقط یکی یا هر دو را ارائه دهید.فیلد
offer_tokenالزامی است و پیشنهاد خریدی را که کاربر در جریان پرداخت سعی در خرید آن دارد، مشخص میکند. در حال حاضر، هر SKU در Google Play دقیقاً یک پیشنهاد دارد (برای مثال، خرید یک کالا با قیمت 10 دلار). در آینده، تیم صورتحساب Play از چندین پیشنهاد پشتیبانی خواهد کرد.برای اطمینان از مرتبط بودن فرادادهها در صورت وقفه در جریان خرید، قبل از اجرای پنجره خرید، فرادادهها را در سرور بکاند خود ذخیره کنید و آنها را با شناسه حساب کاربری، SKU خریداری شده و مهر زمانی فعلی مرتبط کنید. برای اطلاعات بیشتر، به بخش مرتبط کردن خرید با دادههای داخلی مراجعه کنید.
پیشنیازهای تغییر از پرداخت با گوگل با OAuth به پرداخت با گوگل مبتنی بر DLL چیست؟
بازیها میتوانند همچنان از ورود به سیستم OAuth با گوگل برای مدیریت حساب کاربری وارد شده استفاده کنند، اما گوگل توصیه میکند که استفاده از APIهای پرداخت قدیمی REST را متوقف کنید. تغییر از APIهای پرداخت REST (با ورود به سیستم OAuth2) به جریان SDK میتواند یک عملیات با علامتگذاری ویژگی باشد، بنابراین هر دو میتوانند برای مدتی در کنار هم وجود داشته باشند در حالی که بازی تغییر میکند.
آیا فراخوانی API مربوط به Launch Purchase Flow از طریق مرورگر وب پردازش میشود؟
خیر، روند خرید اکنون کاملاً درون بازی و با استفاده از یک پوشش یکپارچه WebView و بدون خروج از کلاینت بازی انجام میشود.
آیا کاربر برای خرید هر بازی باید جداگانه وارد سیستم شود؟
حساب کاربری پیشزمینه در Google Play Games برای هر جلسه بازی استفاده میشود، بنابراین نیازی به ورود مجدد ندارید. حسابی که هنگام شروع جلسه بازی در Google Play Games استفاده میکنید، حسابی است که فراخوانیهای API به عنوان آن صادر میشوند. جریان خرید به طور خودکار از این حساب استفاده خواهد کرد.
آیا یک بازی میتواند همزمان از SDK کامپیوتر و سیستمهای پرداخت قدیمی پشتیبانی کند؟
سیستم پرداخت بسته به نسخه باینری بازی، تحت یک مدل جریان دوگانه عمل میکند. کاربران نسخههای قدیمی به استفاده از جریان موجود ادامه میدهند و کاربران نسخههای جدید به پرداختهای مبتنی بر SDK روی میآورند. کاربران هر دو جریان پرداخت در طول دوره انتقال، در کنار هم وجود دارند.
بسته نرمافزاری ویندوز
هنگام ارسال WAB با استفاده از لانچر 3P، آیا بسته بازی برای بررسی لازم است؟
شما میتوانید فقط فایل نصبی خود را ارسال کنید و نیازی به ارسال کل بسته بازی خود ندارید، منتقد میتواند بسته بازی شما را با استفاده از فایل نصبی دانلود کند.
آیا محدودیتی برای اندازه فایل WAB وجود دارد؟
برای انتشار نصبی، میتوانید تا سقف ۱۰ گیگابایت فایل برای WAB آپلود کنید. برای انتشار مدیریتشده توسط Play، حداکثر حجم فایل WAB، ۲۰۰ گیگابایت است.
چرا بازی من بعد از آپلود WAB نصب یا نمایش داده نمیشود؟
اگر بازی شما بدون نسخه از پیش موجود برای کامپیوتر ("WAB برای اولین بار") در حال انتشار است، سیستم ممکن است به طور خودکار آن را در حالت نگهداری انتشار مدیریتشده قرار دهد. این اتفاق میافتد زیرا هیچ خط پایهای برای بهروزرسانی وجود ندارد. برای انتشار کامل WAB و در دسترس قرار دادن بازی برای نصب، باید به کنسول گوگل پلی بروید و اقدام انتشار مورد نیاز را به صورت دستی انجام دهید (برای مثال، روی "انتشار تغییرات" کلیک کنید).
چگونه میتوانم WAB را برای آزمایش داخلی آپلود کنم؟
حسابهای کاربری لیست مجاز را با گوگل به اشتراک بگذارید تا گوگل بتواند آنها را برای آزمایش داخلی فعال کند. پس از اینکه گوگل لیست را دریافت کرد، مطمئن میشود که آنها در فرآیند پذیرش (onboarding process) گنجانده شدهاند.
بسته WAB باید کجا آپلود شود؟
شما میتوانید بسته WAB را در محلی که در سوال اول ذکر شد آپلود کنید. با این حال، نمیتوانید آن را به صورت دستی منتشر کنید. شما باید زمان دقیق UTC (به ساعت) را به کارکنان پشتیبان گوگل ارائه دهید. سپس گوگل برنامه انتشار را پیکربندی میکند و اطمینان حاصل میکند که به موقع منتشر شود.
کیت توسعه نرمافزار کامپیوتر (SDK)
چه تفاوتهایی بین Legacy API و Google Play Games on PC SDK وجود دارد؟
- API قدیمی فقط قابلیت پرداخت صورتحساب را ارائه میدهد.
- کیت توسعه نرمافزار کامپیوتر (PC SDK) از سرویس دسکتاپ گوگل (GDS) و تمام ویژگیهای کامپیوتر شخصی پشتیبانی میکند.
- با استفاده از کیت توسعه نرمافزار کامپیوتر (PC SDK)، نیازی به ورود به سیستم گوگل مبتنی بر مرورگر نیست.
آیا روش جایگزینی برای راهاندازی اولیه SDK با اجرای مستقیم بازی با استفاده از لانچر بازی، بدون نیاز به استفاده از Google Play Games در کامپیوتر، وجود دارد؟
بازی شما باید از طریق کلاینت Google Play Games on PC اجرا شود. برای جزئیات بیشتر، به این سند توسعهدهنده مراجعه کنید.
آیا SDK کامپیوتر از کاراکترهای چند بایتی در فایل صدور گواهینامه PEM پشتیبانی میکند؟
بله، SDK از کاراکترهای چند بایتی برای صدور گواهینامه پشتیبانی میکند.
SDK چگونه ورود به حساب گوگل را برای چندین نمونه یا حساب کاربری مدیریت میکند؟
هر اجرای بازی در Google Play Games به عنوان یک "جلسه بازی" در نظر گرفته میشود و هر "جلسه بازی" میتواند یک حساب کاربری مرتبط با خود داشته باشد. این حسابها میتوانند متفاوت باشند. بنابراین اگر بازی را با حساب A اجرا کنید و سپس به حساب B بروید و دوباره اجرا کنید، هر دو میتوانند همزمان اجرا شوند.
آیا ادغام Play Install Referrer با PC SDK کار میکند؟
کیت توسعه نرمافزار (SDK) کامپیوتر (نسخه ۲۵.۵.۴۰۹.۰ و بالاتر) از رابط برنامهنویسی کاربردی ارجاعدهنده نصب بازی (Play Install Referrer API) پشتیبانی میکند. برای اطلاعات بیشتر، به رابط برنامهنویسی کاربردی ارجاعدهنده نصب بازی (Play Install Referrer API ) مراجعه کنید.
پرتابگر
اگر بازیکنی به جای Google Play Client از یک لانچر ۳P استفاده کند، آیا حساب Play Games Services او به طور خودکار همگامسازی میشود؟
برای اینکه توابع SDK کار کنند، بازی باید مستقیماً از طریق کلاینت Google Play Games اجرا شود. اگر فرآیند دیگری، مانند یک نصبکننده یا برنامهی اجراکننده، بازی را آغاز کند، آن فرآیند نیز باید از کلاینت Google Play Games اجرا شود. بازی باید تمام پارامترهای دریافتی از کلاینت را به فرآیند کلاینت منتقل کند.
اگر Google Play Games یک لانچر بازی شخص ثالث را اجرا کند، چگونه میتوانم مقداردهی اولیه را انجام دهم؟
لازم نیست SDK را مستقیماً در لانچر خود ادغام کنید. با این حال، باید تمام آرگومانهای خط فرمان دریافت شده توسط لانچر از کلاینت Google Play Games را مستقیماً به فرآیند فرزند ایجاد شده (فایل اجرایی بازی) ارسال کنید. اگر مقداردهی اولیه با شکست مواجه شود (برای مثال، با برگرداندن
kActionRequiredShutdownClientProcess)، تمام فرآیندها از جمله لانچر باید خاتمه یابند تا Google Play Games بتواند بازی را بازیابی و به طور خودکار دوباره راهاندازی کند. برای جزئیات بیشتر، به مرحله 5 در راهنمای راهاندازی مراجعه کنید.چگونه میتوانم بهروزرسانیها و تعمیر و نگهداری بازی و لانچر خود را پس از تولید، مدیریت کنم؟
بهروزرسانیها و نگهداریهای بعدی باید از طریق لانچر شما انجام شود. کلاینت بازیهای گوگل پلی از عملکردهای بهروزرسانی پشتیبانی نمیکند، بنابراین لانچر باید بتواند هم بازی و هم خود لانچر را بهروزرسانی کند.
نصبکننده چگونه توکن جلسه GPG را برای پخش خودکار دریافت میکند؟
GPG توکن جلسه را با استفاده از آرگومان خط فرمان
--g_session_token=<token>به نصبکننده ارسال میکند. برای فعال کردن این، بایدacceptsCommandLineArguments="true"را درplay_publishing_config.xmlخود تنظیم کنید.نصبکننده مسئول استخراج این توکن و استفاده از آن برای اجرای بازی است. اگر تولید توکن با شکست مواجه شود، GPG نصبکننده را بدون توکن اجرا میکند (بازگشت به نسخه قبلی).
مقداردهی اولیه
وقتی با استفاده از برنامه Google Play Games یک بازی را شروع میکنم، آیا جزئیات حساب گوگل من همگامسازی میشود؟
پس از اجرای بازی از طریق کلاینت Google Play Games، حساب کاربری به طور خودکار همگامسازی میشود و نیازی به ورود مجدد از طریق فرآیند ورود به سیستم Google نیست.
آیا میتوان پارامترهای مقداردهی اولیه را چندین بار دوباره استفاده کرد؟
این امر تا زمانی که کلاینت Google Play Games در حال اجرا باشد و اطلاعات ورود معتبر باشد، امکانپذیر است. با این حال، در سناریوهایی مانند سناریوی شرح داده شده در راهنما، تمام فرآیندهای راهاندازی شده توسط بازی باید با بستن بازی توسط کاربر یا خروج از بازی به دلیل خرابی مقداردهی اولیه SDK، مانند
kActionRequiredShutdownClientProcess، خاتمه یابند.راهی هست که بشه یه میانبر درست کرد که بشه مستقیم بازی رو باز کرد؟
برای باز کردن مستقیم بازی میتوانید از آدرس زیر استفاده کنید:
googleplaygames://launch/?pid=2&id=com.company.gamenameاین URI از تشخیص باز بودن یا نبودن کلاینت Google Play Games on PC پشتیبانی میکند. اگر کلاینت باز نباشد، کلاینت Google Play Games قبل از اجرای بازی یا لانچر باز میشود. برای جلوگیری از اجرای چندین نمونه از بازی یا لانچر، باید بازی یا لانچر را مدیریت کنید.
آیا راهی برای تأیید نصب بازیهای گوگل پلی روی کامپیوتر بدون استفاده از SDK وجود دارد؟
شما میتوانید وضعیت نصب بازیهای گوگل پلی روی کامپیوتر را بدون ادغام SDK با بررسی وجود کلید رجیستری ویندوز زیر تأیید کنید:
HKEY_LOCAL_MACHINE\SOFTWARE\Google\Play Games Servicesوجود این کلید نشان میدهد که سرویسهای Google Play Games (که برای اجرای بازیها روی کامپیوتر لازم است) روی دستگاه نصب شدهاند. اگر این کلید وجود ندارد، باید کاربر را به صفحه نصب Google Play Games روی کامپیوتر هدایت کنید تا کلاینت را دانلود و نصب کند.
آزمایش
آیا محیطهای تست باز یا تست بستهای مشابه موبایل وجود دارد؟
اگرچه یک محیط آزمایشی (sandbox) اختصاصی برای همه در دسترس نیست، اما ما نیاز به یک محیط آزمایشی شبیه به محیط عملیاتی برای توسعهدهندگان را تشخیص میدهیم. به زودی یک راهحل قویتر ارائه خواهد شد.
چطور میتوانم آزمایشکنندگان جدید اضافه کنم؟
رابط گوگل شما برای هر پروژه کامپیوتری یک گروه ایمیل ایجاد میکند که باید حسابهای گوگل آزمایشکنندگان به آن اضافه شود. فقط اعضای این گروه ایمیل مجاز به دانلود بستههای آزمایشی از طریق بازیهای گوگل پلی هستند.
متفرقه
آیا میتوانم از VPN استفاده کنم؟
برای توسعهدهندگانی که نیاز دارند بازی خود را در مناطقی آزمایش کنند که Google Play Games در رایانه شخصی پشتیبانی نمیشود، توصیه میکنیم از VPN برای دریافت آدرس IP از یک منطقه پشتیبانیشده استفاده کنند.
مطمئن شوید که حالت TUN را روی VPN فعال کردهاید. راهنمایی در مورد فعال کردن حالت TUN و پیکربندی فایروال را میتوانید در دفترچه راهنمای ارائه دهنده VPN پیدا کنید.
پس از فعال شدن حالت TUN، برای آزمایش، Google Play Games را روی رایانه شخصی و شبیهساز نصب کنید .
چگونه میتوانم توسعه بازیهای گوگل پلی را روی کامپیوتر با یونیتی یا ویرایشگر UE شروع کنم؟
- حالت توسعهدهنده را فعال کنید و آزمایش را ادامه دهید.
- فایلهای
manifest.xmlو.dllرا اضافه کنید. برای اطلاعات بیشتر، به سند توسعهدهنده مراجعه کنید. - برای اهداف آزمایشی، یک GUID شریک دسترسی زودهنگام ثبت کنید.
چگونه میتوانم از کلیدهای رجیستری به درستی استفاده کنم؟
شما باید کلیدهای رجیستری را بر اساس کندوی ریشه ایجاد کنید. میتوانید کندوی ریشه را بسته به هدف و ماهیت دادهها، روی
HKEY_LOCAL_MACHINEیاHKEY_CURRENT_USERتنظیم کنید. کندویHKEY_LOCAL_MACHINEبه عنوان مثال در دستورالعملها استفاده شده است.الزامات بررسی بستههای رایانه شخصی توسط گوگل چیست؟
بستههای کامپیوتری تحت اسکن بدافزار قرار میگیرند و پس از آن، بررسیکنندگان فقط مراحل نصب بازی، راهاندازی موفقیتآمیز و حذف نصب را آزمایش میکنند.
آیا ادغام همه APIها ضروری است؟
سایر APIها الزامی نیستند، اما مزایای بیشتری ارائه میدهند.
google::play::billingبرای خریدهای درونبرنامهای و فروش محتوای دیجیتال ضروری است.google::play::install_referrerبرای ردیابی دادههای ارجاعی مورد نیاز است تا به شما کمک کند بفهمید کدام منابع ترافیکی بیشترین کاربران را برای دانلود برنامه شما ارسال میکنند.google::play::games::integrityبرای محافظت از برنامه شما در برابر عوامل مخرب با شناسایی دستگاههای بالقوه خطرناک و شبیهسازهای ناشناخته مورد نیاز است.چرا برخی از فرآیندهای بازی با بسته شدن کلاینت بازیهای گوگل پلی متوقف میشوند، در حالی که برخی دیگر اینطور نیستند؟
گوگل زیرفرآیندها یا فرآیندهای بازی در حال اجرا را کنترل نمیکند. رفتار آن بستگی به این دارد که آیا بازی یک بازی شبیهسازی شده اندروید است یا یک بازی کامپیوتری. بازیهای شبیهسازی شده در محیط خودشان نصب میشوند، بنابراین رفتار آنها تا حد زیادی به مقداردهی اولیه و خاموش شدن شبیهساز بستگی دارد.
آیا باید از قابلیت حذف نصب بازیهای گوگل پلی استفاده کنم یا از یک حذفکنندهی سفارشی؟
گوگل استفاده از قابلیت حذف نصب بازیهای گوگل پلی ما را توصیه میکند.
کمکهای بیشتر
اگر به کمک بیشتری نیاز دارید که در این سوالات متداول پوشش داده نشده است، لطفاً با google-play-games-pc@google.com تماس بگیرید.
،این سند به سوالات رایج در مورد SDKها و انتشار برای بازیهای Google Play در رایانه شخصی پاسخ میدهد.
کسب درآمد
چرا پس از افزودن کلید صدور صورتحساب یا مجوز جدید، روند خرید من با خطای کد ۶ مواجه میشود؟
کلیدهای مجوز جدید تولید شده در کنسول گوگل پلی، قبل از اینکه حافظههای داخلی گوگل پلی در تمام محیطهای ارائه دهنده همگامسازی شوند، با تأخیر چند ساعته در ذخیرهسازی و انتشار در بخش پشتیبانی تجاری مواجه میشوند. حتی اگر کلاینت بازی شما بتواند جزئیات محصول را با موفقیت جستجو کند، درخواستهای خرید با کد خطای ۶ تا زمان تکمیل همگامسازی، با شکست مواجه میشوند. قبل از آزمایش خریدها، چند ساعت پس از آپلود یا بهروزرسانی کلید مجوز خود صبر کنید.
آیا میتوانم بدون سرور پشتیبان از جریان خرید استفاده کنم؟
از دیدگاه امنیتی، گوگل استفاده از یک سرور بکاند را توصیه میکند.
برای اطلاعات بیشتر، به فرآیند بدون سرور پشتیبان مراجعه کنید.
آیا سیستمهای پرداخت مبتنی بر API موجود پس از ادغام Google Play Games on PC SDK مجاز هستند؟
تمام پرداختها باید توسط Google Play Games on PC SDK با استفاده از Google Play Billing انجام شود. شما نمیتوانید از روش پرداخت مبتنی بر API موجود خود در همان بازی استفاده کنید.
چگونه میتوانیم خریدها را در حالت توسعهدهنده مصرف کنیم؟
خرید را ظرف ۳ دقیقه در حالت توسعهدهنده انجام دهید، در غیر این صورت وجه خرید به شما بازگردانده خواهد شد.
آیا پرداختهای دورهای یا اشتراکها پشتیبانی میشوند؟
نه برای آیندهی نزدیک، اگرچه میتوانید موارد استفادهی خاص خود را برای اضافه کردن به نقشهی راه آیندهمان ارائه دهید.
خطای صورتحساب (Billing Error) در تماسهای خرید من چیست؟
خطای BillingError پاسخ نتیجه پرداخت است. LaunchPurchaseFlow بلافاصله و بدون مسدود شدن، نتیجه را برمیگرداند، اما شما باید به فراخوانی آن گوش دهید تا بدانید چه زمانی تمام شده و نتیجه را ثبت کنید.
چگونه میتوانم از تأیید خرید سمت کلاینت استفاده کنم؟
ما استفاده از خرید سمت سرور و فرآیند تأیید آن را توصیه میکنیم. پردازش خریدها از برنامه کلاینت شما مستلزم آن است که بازی شما در لیست مجاز باشد. اگر بازی شما نیاز به دسترسی دارد، لطفاً با شریک گوگل خود تماس بگیرید. برای اطلاعات بیشتر، به فرآیند بدون سرور پشتیبان مراجعه کنید.
محدودیتهای API برای جستجوی جزئیات محصول چیست؟
حداکثر تعداد محصولاتی که میتوان در یک فراخوانی به API مربوط به
QueryProductDetailsدرخواست داد، ۵۰ عدد است. اگر از این حد تجاوز کنید، باید درخواست را به چندین فراخوانی تقسیم کنید.چه پارامترهایی هنگام فراخوانی Query Purchases یا Launch Purchase Flow در Billing Client مورد نیاز است؟
این تابع
QueryPurchasesContinuationمیپذیرد که یک فراخوانی تابع با امضایstd::function<void(QueryPurchasesResult)>است. این فراخوانی، نتیجه را به همراه تمام جزئیات خریدProductPurchaseDetails) به شما ارسال میکند. این اطلاعات در فایلهای هدر SDK در فایلincludes/billing/models.hموجود است.تابع ok() در خروجی
launch_purchase_flow_resultدارای توابعok() وcode() است. تابعok() میزان موفقیتآمیز بودن جریان را برمیگرداند. تابعcode() مقدارBillingError(includes/billing/enums.h) را برمیگرداند که دارای 10 حالت خطای احتمالی، مانند لغو توسط کاربر یا خطای شبکه است.آیا سفارش سفارشی برای جریان خرید اولیه در بخش صورتحساب مشتری پشتیبانی میشود؟
در طراحی فعلی SDK، هیچ راهی برای ارسال payload خودتان وجود ندارد. با این حال، میتوانید هر ترکیبی از
obfuscated_account_idوobfuscated_profile_idرا ارائه دهید. میتوانید هیچ کدام، فقط یکی یا هر دو را ارائه دهید.فیلد
offer_tokenالزامی است و پیشنهاد خریدی را که کاربر در جریان پرداخت سعی در خرید آن دارد، مشخص میکند. در حال حاضر، هر SKU در Google Play دقیقاً یک پیشنهاد دارد (برای مثال، خرید یک کالا با قیمت 10 دلار). در آینده، تیم صورتحساب Play از چندین پیشنهاد پشتیبانی خواهد کرد.برای اطمینان از مرتبط بودن فرادادهها در صورت وقفه در جریان خرید، قبل از اجرای پنجره خرید، فرادادهها را در سرور بکاند خود ذخیره کنید و آنها را با شناسه حساب کاربری، SKU خریداری شده و مهر زمانی فعلی مرتبط کنید. برای اطلاعات بیشتر، به بخش مرتبط کردن خرید با دادههای داخلی مراجعه کنید.
پیشنیازهای تغییر از پرداخت با گوگل با OAuth به پرداخت با گوگل مبتنی بر DLL چیست؟
بازیها میتوانند همچنان از ورود به سیستم OAuth با گوگل برای مدیریت حساب کاربری وارد شده استفاده کنند، اما گوگل توصیه میکند که استفاده از APIهای پرداخت قدیمی REST را متوقف کنید. تغییر از APIهای پرداخت REST (با ورود به سیستم OAuth2) به جریان SDK میتواند یک عملیات با علامتگذاری ویژگی باشد، بنابراین هر دو میتوانند برای مدتی در کنار هم وجود داشته باشند در حالی که بازی تغییر میکند.
آیا فراخوانی API مربوط به Launch Purchase Flow از طریق مرورگر وب پردازش میشود؟
خیر، روند خرید اکنون کاملاً درون بازی و با استفاده از یک پوشش یکپارچه WebView و بدون خروج از کلاینت بازی انجام میشود.
آیا کاربر برای خرید هر بازی باید جداگانه وارد سیستم شود؟
حساب کاربری پیشزمینه در Google Play Games برای هر جلسه بازی استفاده میشود، بنابراین نیازی به ورود مجدد ندارید. حسابی که هنگام شروع جلسه بازی در Google Play Games استفاده میکنید، حسابی است که فراخوانیهای API به عنوان آن صادر میشوند. جریان خرید به طور خودکار از این حساب استفاده خواهد کرد.
آیا یک بازی میتواند همزمان از SDK کامپیوتر و سیستمهای پرداخت قدیمی پشتیبانی کند؟
سیستم پرداخت بسته به نسخه باینری بازی، تحت یک مدل جریان دوگانه عمل میکند. کاربران نسخههای قدیمی به استفاده از جریان موجود ادامه میدهند و کاربران نسخههای جدید به پرداختهای مبتنی بر SDK روی میآورند. کاربران هر دو جریان پرداخت در طول دوره انتقال، در کنار هم وجود دارند.
بسته نرمافزاری ویندوز
هنگام ارسال WAB با استفاده از لانچر 3P، آیا بسته بازی برای بررسی لازم است؟
شما میتوانید فقط فایل نصبی خود را ارسال کنید و نیازی به ارسال کل بسته بازی خود ندارید، منتقد میتواند بسته بازی شما را با استفاده از فایل نصبی دانلود کند.
آیا محدودیتی برای اندازه فایل WAB وجود دارد؟
برای انتشار نصبی، میتوانید تا سقف ۱۰ گیگابایت فایل برای WAB آپلود کنید. برای انتشار مدیریتشده توسط Play، حداکثر حجم فایل WAB، ۲۰۰ گیگابایت است.
چرا بازی من بعد از آپلود WAB نصب یا نمایش داده نمیشود؟
اگر بازی شما بدون نسخه از پیش موجود برای کامپیوتر ("WAB برای اولین بار") در حال انتشار است، سیستم ممکن است به طور خودکار آن را در حالت نگهداری انتشار مدیریتشده قرار دهد. این اتفاق میافتد زیرا هیچ خط پایهای برای بهروزرسانی وجود ندارد. برای انتشار کامل WAB و در دسترس قرار دادن بازی برای نصب، باید به کنسول گوگل پلی بروید و اقدام انتشار مورد نیاز را به صورت دستی انجام دهید (برای مثال، روی "انتشار تغییرات" کلیک کنید).
چگونه میتوانم WAB را برای آزمایش داخلی آپلود کنم؟
حسابهای کاربری لیست مجاز را با گوگل به اشتراک بگذارید تا گوگل بتواند آنها را برای آزمایش داخلی فعال کند. پس از اینکه گوگل لیست را دریافت کرد، مطمئن میشود که آنها در فرآیند پذیرش (onboarding process) گنجانده شدهاند.
بسته WAB باید کجا آپلود شود؟
شما میتوانید بسته WAB را در محلی که در سوال اول ذکر شد آپلود کنید. با این حال، نمیتوانید آن را به صورت دستی منتشر کنید. شما باید زمان دقیق UTC (به ساعت) را به کارکنان پشتیبان گوگل ارائه دهید. سپس گوگل برنامه انتشار را پیکربندی میکند و اطمینان حاصل میکند که به موقع منتشر شود.
کیت توسعه نرمافزار کامپیوتر (SDK)
چه تفاوتهایی بین Legacy API و Google Play Games on PC SDK وجود دارد؟
- API قدیمی فقط قابلیت پرداخت صورتحساب را ارائه میدهد.
- کیت توسعه نرمافزار کامپیوتر (PC SDK) از سرویس دسکتاپ گوگل (GDS) و تمام ویژگیهای کامپیوتر شخصی پشتیبانی میکند.
- با استفاده از کیت توسعه نرمافزار کامپیوتر (PC SDK)، نیازی به ورود به سیستم گوگل مبتنی بر مرورگر نیست.
آیا روش جایگزینی برای راهاندازی اولیه SDK با اجرای مستقیم بازی با استفاده از لانچر بازی، بدون نیاز به استفاده از Google Play Games در کامپیوتر، وجود دارد؟
بازی شما باید از طریق کلاینت Google Play Games on PC اجرا شود. برای جزئیات بیشتر، به این سند توسعهدهنده مراجعه کنید.
آیا SDK کامپیوتر از کاراکترهای چند بایتی در فایل صدور گواهینامه PEM پشتیبانی میکند؟
بله، SDK از کاراکترهای چند بایتی برای صدور گواهینامه پشتیبانی میکند.
SDK چگونه ورود به حساب گوگل را برای چندین نمونه یا حساب کاربری مدیریت میکند؟
هر اجرای بازی در Google Play Games به عنوان یک "جلسه بازی" در نظر گرفته میشود و هر "جلسه بازی" میتواند یک حساب کاربری مرتبط با خود داشته باشد. این حسابها میتوانند متفاوت باشند. بنابراین اگر بازی را با حساب A اجرا کنید و سپس به حساب B بروید و دوباره اجرا کنید، هر دو میتوانند همزمان اجرا شوند.
آیا ادغام Play Install Referrer با PC SDK کار میکند؟
کیت توسعه نرمافزار (SDK) کامپیوتر (نسخه ۲۵.۵.۴۰۹.۰ و بالاتر) از رابط برنامهنویسی کاربردی ارجاعدهنده نصب بازی (Play Install Referrer API) پشتیبانی میکند. برای اطلاعات بیشتر، به رابط برنامهنویسی کاربردی ارجاعدهنده نصب بازی (Play Install Referrer API ) مراجعه کنید.
پرتابگر
اگر بازیکنی به جای Google Play Client از یک لانچر ۳P استفاده کند، آیا حساب Play Games Services او به طور خودکار همگامسازی میشود؟
برای اینکه توابع SDK کار کنند، بازی باید مستقیماً از طریق کلاینت Google Play Games اجرا شود. اگر فرآیند دیگری، مانند یک نصبکننده یا برنامهی اجراکننده، بازی را آغاز کند، آن فرآیند نیز باید از کلاینت Google Play Games اجرا شود. بازی باید تمام پارامترهای دریافتی از کلاینت را به فرآیند کلاینت منتقل کند.
اگر Google Play Games یک لانچر بازی شخص ثالث را اجرا کند، چگونه میتوانم مقداردهی اولیه را انجام دهم؟
لازم نیست SDK را مستقیماً در لانچر خود ادغام کنید. با این حال، باید تمام آرگومانهای خط فرمان دریافت شده توسط لانچر از کلاینت Google Play Games را مستقیماً به فرآیند فرزند ایجاد شده (فایل اجرایی بازی) ارسال کنید. اگر مقداردهی اولیه با شکست مواجه شود (برای مثال، با برگرداندن
kActionRequiredShutdownClientProcess)، تمام فرآیندها از جمله لانچر باید خاتمه یابند تا Google Play Games بتواند بازی را بازیابی و به طور خودکار دوباره راهاندازی کند. برای جزئیات بیشتر، به مرحله 5 در راهنمای راهاندازی مراجعه کنید.چگونه میتوانم بهروزرسانیها و تعمیر و نگهداری بازی و لانچر خود را پس از تولید، مدیریت کنم؟
بهروزرسانیها و نگهداریهای بعدی باید از طریق لانچر شما انجام شود. کلاینت بازیهای گوگل پلی از عملکردهای بهروزرسانی پشتیبانی نمیکند، بنابراین لانچر باید بتواند هم بازی و هم خود لانچر را بهروزرسانی کند.
نصبکننده چگونه توکن جلسه GPG را برای پخش خودکار دریافت میکند؟
GPG توکن جلسه را با استفاده از آرگومان خط فرمان
--g_session_token=<token>به نصبکننده ارسال میکند. برای فعال کردن این، بایدacceptsCommandLineArguments="true"را درplay_publishing_config.xmlخود تنظیم کنید.نصبکننده مسئول استخراج این توکن و استفاده از آن برای اجرای بازی است. اگر تولید توکن با شکست مواجه شود، GPG نصبکننده را بدون توکن اجرا میکند (بازگشت به نسخه قبلی).
مقداردهی اولیه
وقتی با استفاده از برنامه Google Play Games یک بازی را شروع میکنم، آیا جزئیات حساب گوگل من همگامسازی میشود؟
پس از اجرای بازی از طریق کلاینت Google Play Games، حساب کاربری به طور خودکار همگامسازی میشود و نیازی به ورود مجدد از طریق فرآیند ورود به سیستم Google نیست.
آیا میتوان پارامترهای مقداردهی اولیه را چندین بار دوباره استفاده کرد؟
این امر تا زمانی که کلاینت Google Play Games در حال اجرا باشد و اطلاعات ورود معتبر باشد، امکانپذیر است. با این حال، در سناریوهایی مانند سناریوی شرح داده شده در راهنما، تمام فرآیندهای راهاندازی شده توسط بازی باید با بستن بازی توسط کاربر یا خروج از بازی به دلیل خرابی مقداردهی اولیه SDK، مانند
kActionRequiredShutdownClientProcess، خاتمه یابند.راهی هست که بشه یه میانبر درست کرد که بشه مستقیم بازی رو باز کرد؟
برای باز کردن مستقیم بازی میتوانید از آدرس زیر استفاده کنید:
googleplaygames://launch/?pid=2&id=com.company.gamenameاین URI از تشخیص باز بودن یا نبودن کلاینت Google Play Games on PC پشتیبانی میکند. اگر کلاینت باز نباشد، کلاینت Google Play Games قبل از اجرای بازی یا لانچر باز میشود. برای جلوگیری از اجرای چندین نمونه از بازی یا لانچر، باید بازی یا لانچر را مدیریت کنید.
آیا راهی برای تأیید نصب بازیهای گوگل پلی روی کامپیوتر بدون استفاده از SDK وجود دارد؟
شما میتوانید وضعیت نصب بازیهای گوگل پلی روی کامپیوتر را بدون ادغام SDK با بررسی وجود کلید رجیستری ویندوز زیر تأیید کنید:
HKEY_LOCAL_MACHINE\SOFTWARE\Google\Play Games Servicesوجود این کلید نشان میدهد که سرویسهای Google Play Games (که برای اجرای بازیها روی کامپیوتر لازم است) روی دستگاه نصب شدهاند. اگر این کلید وجود ندارد، باید کاربر را به صفحه نصب Google Play Games روی کامپیوتر هدایت کنید تا کلاینت را دانلود و نصب کند.
آزمایش
آیا محیطهای تست باز یا تست بستهای مشابه موبایل وجود دارد؟
اگرچه یک محیط آزمایشی (sandbox) اختصاصی برای همه در دسترس نیست، اما ما نیاز به یک محیط آزمایشی شبیه به محیط عملیاتی برای توسعهدهندگان را تشخیص میدهیم. به زودی یک راهحل قویتر ارائه خواهد شد.
چطور میتوانم آزمایشکنندگان جدید اضافه کنم؟
رابط گوگل شما برای هر پروژه کامپیوتری یک گروه ایمیل ایجاد میکند که باید حسابهای گوگل آزمایشکنندگان به آن اضافه شود. فقط اعضای این گروه ایمیل مجاز به دانلود بستههای آزمایشی از طریق بازیهای گوگل پلی هستند.
متفرقه
آیا میتوانم از VPN استفاده کنم؟
برای توسعهدهندگانی که نیاز دارند بازی خود را در مناطقی آزمایش کنند که Google Play Games در رایانه شخصی پشتیبانی نمیشود، توصیه میکنیم از VPN برای دریافت آدرس IP از یک منطقه پشتیبانیشده استفاده کنند.
مطمئن شوید که حالت TUN را روی VPN فعال کردهاید. راهنمایی در مورد فعال کردن حالت TUN و پیکربندی فایروال را میتوانید در دفترچه راهنمای ارائه دهنده VPN پیدا کنید.
پس از فعال شدن حالت TUN، برای آزمایش، Google Play Games را روی رایانه شخصی و شبیهساز نصب کنید .
چگونه میتوانم توسعه بازیهای گوگل پلی را روی کامپیوتر با یونیتی یا ویرایشگر UE شروع کنم؟
- حالت توسعهدهنده را فعال کنید و آزمایش را ادامه دهید.
- فایلهای
manifest.xmlو.dllرا اضافه کنید. برای اطلاعات بیشتر، به سند توسعهدهنده مراجعه کنید. - برای اهداف آزمایشی، یک GUID شریک دسترسی زودهنگام ثبت کنید.
چگونه میتوانم از کلیدهای رجیستری به درستی استفاده کنم؟
شما باید کلیدهای رجیستری را بر اساس کندوی ریشه ایجاد کنید. میتوانید کندوی ریشه را بسته به هدف و ماهیت دادهها، روی
HKEY_LOCAL_MACHINEیاHKEY_CURRENT_USERتنظیم کنید. کندویHKEY_LOCAL_MACHINEبه عنوان مثال در دستورالعملها استفاده شده است.الزامات بررسی بستههای رایانه شخصی توسط گوگل چیست؟
بستههای کامپیوتری تحت اسکن بدافزار قرار میگیرند و پس از آن، بررسیکنندگان فقط مراحل نصب بازی، راهاندازی موفقیتآمیز و حذف نصب را آزمایش میکنند.
آیا ادغام همه APIها ضروری است؟
سایر APIها الزامی نیستند، اما مزایای بیشتری ارائه میدهند.
google::play::billingبرای خریدهای درونبرنامهای و فروش محتوای دیجیتال ضروری است.google::play::install_referrerبرای ردیابی دادههای ارجاعی مورد نیاز است تا به شما کمک کند بفهمید کدام منابع ترافیکی بیشترین کاربران را برای دانلود برنامه شما ارسال میکنند.google::play::games::integrityبرای محافظت از برنامه شما در برابر عوامل مخرب با شناسایی دستگاههای بالقوه خطرناک و شبیهسازهای ناشناخته مورد نیاز است.چرا برخی از فرآیندهای بازی با بسته شدن کلاینت بازیهای گوگل پلی متوقف میشوند، در حالی که برخی دیگر اینطور نیستند؟
گوگل زیرفرآیندها یا فرآیندهای بازی در حال اجرا را کنترل نمیکند. رفتار آن بستگی به این دارد که آیا بازی یک بازی شبیهسازی شده اندروید است یا یک بازی کامپیوتری. بازیهای شبیهسازی شده در محیط خودشان نصب میشوند، بنابراین رفتار آنها تا حد زیادی به مقداردهی اولیه و خاموش شدن شبیهساز بستگی دارد.
آیا باید از قابلیت حذف نصب بازیهای گوگل پلی استفاده کنم یا از یک حذفکنندهی سفارشی؟
گوگل استفاده از قابلیت حذف نصب بازیهای گوگل پلی ما را توصیه میکند.
کمکهای بیشتر
اگر به کمک بیشتری نیاز دارید که در این سوالات متداول پوشش داده نشده است، لطفاً با google-play-games-pc@google.com تماس بگیرید.
،این سند به سوالات رایج در مورد SDKها و انتشار برای بازیهای Google Play در رایانه شخصی پاسخ میدهد.
کسب درآمد
چرا پس از افزودن کلید صدور صورتحساب یا مجوز جدید، روند خرید من با خطای کد ۶ مواجه میشود؟
کلیدهای مجوز جدید تولید شده در کنسول گوگل پلی، قبل از اینکه حافظههای داخلی گوگل پلی در تمام محیطهای ارائه دهنده همگامسازی شوند، با تأخیر چند ساعته در ذخیرهسازی و انتشار در بخش پشتیبانی تجاری مواجه میشوند. حتی اگر کلاینت بازی شما بتواند جزئیات محصول را با موفقیت جستجو کند، درخواستهای خرید با کد خطای ۶ تا زمان تکمیل همگامسازی، با شکست مواجه میشوند. قبل از آزمایش خریدها، چند ساعت پس از آپلود یا بهروزرسانی کلید مجوز خود صبر کنید.
آیا میتوانم بدون سرور پشتیبان از جریان خرید استفاده کنم؟
از دیدگاه امنیتی، گوگل استفاده از یک سرور بکاند را توصیه میکند.
برای اطلاعات بیشتر، به فرآیند بدون سرور پشتیبان مراجعه کنید.
آیا سیستمهای پرداخت مبتنی بر API موجود پس از ادغام Google Play Games on PC SDK مجاز هستند؟
تمام پرداختها باید توسط Google Play Games on PC SDK با استفاده از Google Play Billing انجام شود. شما نمیتوانید از روش پرداخت مبتنی بر API موجود خود در همان بازی استفاده کنید.
چگونه میتوانیم خریدها را در حالت توسعهدهنده مصرف کنیم؟
خرید را ظرف ۳ دقیقه در حالت توسعهدهنده انجام دهید، در غیر این صورت وجه خرید به شما بازگردانده خواهد شد.
آیا پرداختهای دورهای یا اشتراکها پشتیبانی میشوند؟
نه برای آیندهی نزدیک، اگرچه میتوانید موارد استفادهی خاص خود را برای اضافه کردن به نقشهی راه آیندهمان ارائه دهید.
خطای صورتحساب (Billing Error) در تماسهای خرید من چیست؟
خطای BillingError پاسخ نتیجه پرداخت است. LaunchPurchaseFlow بلافاصله و بدون مسدود شدن، نتیجه را برمیگرداند، اما شما باید به فراخوانی آن گوش دهید تا بدانید چه زمانی تمام شده و نتیجه را ثبت کنید.
چگونه میتوانم از تأیید خرید سمت کلاینت استفاده کنم؟
We recommend using server-side purchase and its verification process. Processing purchases from your client app requires your game to be on an allowlist. Please contact your Google Partner if your game requires access. For more information, see Process without a backend server .
What are the API limits for querying product details?
The maximum number of products that can be queried in a single call to the
QueryProductDetailsAPI is 50. If you exceed this limit, you must split the request into multiple calls.What parameters are required when calling Query Purchases or Launch Purchase Flow in the Billing Client?
The function accepts
QueryPurchasesContinuation, which is a function callback with thestd::function<void(QueryPurchasesResult)>signature. The callback passes the result to you with all theProductPurchaseDetails. This information is available in the SDK header files in theincludes/billing/models.hfile.The resulting
launch_purchase_flow_resulthasok()andcode()functions. Theok()function returns whether the flow is successful. Thecode()function returns theBillingErrorenum (includes/billing/enums.h), which has 10 possible error cases, such as user canceled or network error.Is a custom ordering supported for the Launch Purchase Flow in the Billing Client?
In the current SDK design, there is no way to pass in your own payload. However, you can provide any combination of
obfuscated_account_idandobfuscated_profile_id. You can provide none, just one, or both.The
offer_tokenfield is required and specifies the purchase offer that the user is attempting to buy in the checkout flow. For now, each SKU in Google Play has exactly one offer (for example, buy one item for $10). In the future, the Play billing team will provide support for multiple offers.To ensure metadata is associated in the case of purchase flow interruptions, store the metadata on your backend server prior to launching the purchase dialog and associate it with your user's account ID, the SKU being purchased, and the current timestamp. For more information, see Associate a purchase with internal data .
What are the prerequisites for switching from Google billing with OAuth to the DLL-based Google billing?
Games can continue to use the OAuth sign-in with Google to manage the signed-in account, but Google recommends that you stop using the legacy REST billing APIs. Switching from the REST billing APIs (with OAuth2 sign-in) to the SDK flow can be a feature-flagged operation, so both can coexist for a period of time while the game switches over.
Is the Launch Purchase Flow API call processed through a web browser?
No, the purchase flow is now completed entirely in-game using a seamless WebView overlay, without leaving the game client.
Does a user need to sign in separately for each game to make a purchase?
The foreground account in Google Play Games is used for each game session, so you don't need to sign in again. The account that you use in Google Play Games when the game session starts is the account that API calls are issued as. The purchase flow will use this account automatically.
Can a game support both the PC SDK and legacy payment systems at the same time?
The payment system operates under a dual-flow model depending on the game binary version. Users on legacy builds continue on the existing flow, and users on new builds transition to SDK-based payments. Users on both payment flows coexist during the transition period.
Windows App Bundle
When submitting a WAB using a 3P launcher, is the game package required for review?
You can just submit your installer and don't need to submit your entire game package, the reviewer will be able to download your game package using the installer.
Are there any limitations of WAB file size?
For Installer Publishing, you can upload up to 10 GB file size for a WAB. For Play Managed Publishing, the maximum WAB file size limit is 200 GB.
Why isn't my game installing or appearing after I uploaded my WAB?
If your game is being onboarded without a pre-existing PC version (a "first- time WAB"), the system may automatically place it into a Managed Publishing holding state. This happens because there is no existing baseline to update. To fully release the WAB and make the game available for installation, you must navigate to the Google Play Console and manually execute the required publish action (for example, click "Publish changes").
How do I upload the WAB for internal testing?
Share the allowlist accounts with Google so Google can enable them for internal testing. After Google has the list, Google makes sure they are included in the onboarding process.
Where should the WAB package be uploaded?
You can upload the WAB package at the location mentioned in the first question. However, you cannot publish it manually. You must provide the Google backend staff with a precise UTC time (down to the hour). Google then configures the release schedule and ensures it is published on time.
کیت توسعه نرمافزار کامپیوتر (SDK)
What are the differences between the Legacy API and Google Play Games on PC SDK?
- The legacy API only offers billing functionality.
- The PC SDK supports Google Desktop Service (GDS) and full PC features.
- No browser-based Google Sign-in is required with the PC SDK.
Is there an alternative way to initialize the SDK by launching the game directly using the game launcher, without going through Google Play Games on PC?
Your game must be launched through the Google Play Games on PC client. For more details, refer to this developer document .
Does the PC SDK support multibyte characters in the PEM certification file?
Yes, the SDK supports multibyte characters for certification.
How does the SDK handle Google Account sign-in for multiple instances or accounts?
Each game launch in Google Play Games is treated as a "game session" and each "game session" can have an account associated with it. They can be different. So if you launch the game with account A, and then switch to account B and relaunch both can run at the same time.
Does the Play Install Referrer integration work with the PC SDK?
The PC SDK (25.5.409.0 and higher) supports the Play Install Referrer API. For more information, see Play Install Referrer API .
پرتابگر
If a player uses a 3P launcher instead of the Google Play Client, will their Play Games Services account sync automatically?
For the SDK functions to operate, the game must be launched directly through the Google Play Games client. If another process, such as an installer or launcher application, initiates the game, then that process must itself be launched from the Google Play Games client. The game must pass all parameters received from the client to the client process.
How do I handle initialization if Google Play Games launches a third-party game launcher?
You are not required to integrate the SDK directly into your launcher. However, you must pass all command-line arguments received by the launcher from the Google Play Games client directly to the spawned child process (the game executable). If initialization fails (for example, by returning
kActionRequiredShutdownClientProcess), all processes including the launcher must be terminated so Google Play Games can attempt to recover and relaunch the game automatically. For more details, see Step 5 in the setup guide .How can I handle updates and maintenance to my game and launcher after it is in production?
Subsequent updates and maintenance must be implemented through your launcher. The Google Play Games client does not support update functions, so the launcher must be capable of updating both the game and the launcher itself.
How does the installer receive the GPG session token for Auto-Play?
GPG passes the session token using the
--g_session_token=<token>command-line argument to the installer. To enable this, you must setacceptsCommandLineArguments="true"in yourplay_publishing_config.xml.The installer is responsible for extracting this token and using it to launch the game. If the token generation fails, GPG launches the installer without the token (fallback).
مقداردهی اولیه
When I start a game using the Google Play Games app, does it sync my Google Account details?
After launching the game through Google Play Games client, the account is automatically synchronized and there's no need to login through the Google Login process again.
Is it possible to reuse the initialization parameters multiple times?
This is possible as long as the Google Play Games client is running and the login information is valid. However, in scenarios like the one described in the guide, all processes launched by the game must be terminated when the user closes the game or the game exits due to an SDK initialization failure, such as
kActionRequiredShutdownClientProcess.Is there any way to create a shortcut to open the game directly?
You can use the following URI for opening the game directly:
googleplaygames://launch/?pid=2&id=com.company.gamenameThe URI supports detecting whether the Google Play Games on PC client is opened. If the client is not open, the Google Play Games client opens before the game or launcher runs. You need to manage the game or launcher to prevent multiple instances from running.
Is there any way to verify the Google Play Games on PC installation without using the SDK?
You can verify the installation status of Google Play Games on PC without integrating the SDK by checking for the presence of the following Windows Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Google\Play Games ServicesThe presence of this key indicates that the Google Play Games services (required to run games on PC) are installed on the machine. If the key is missing, you should direct the user to the Google Play Games on PC installation page to download and install the client.
آزمایش
Are there any open testing or closed testing environments similar to the mobile?
While a dedicated end-to-end sandbox isn't available, we recognize the need for a production-like testing environment for developers. A more robust solution will be offered soon.
How can I add new testers?
Your Google point of contact creates an email group for each PC project, where the testers' Google Accounts must be added. Only members of this email group are authorized to download the test packages within Google Play Games.
متفرقه
آیا میتوانم از VPN استفاده کنم؟
For developers requiring to test their game in regions where Google Play Games on PC is not supported, we recommend that you use a VPN to acquire an IP address from a supported region .
Ensure that you enable TUN mode on VPN. Guidance on enabling TUN mode and configuring the firewall can be found in the VPN provider's operating manual.
After the TUN mode is enabled, install the Google Play Games on PC and the emulator for testing purposes.
How can I start developing for Google Play Games on PC in Unity or UE Editor?
- Enable the developer Mode and proceed with testing.
- Add the
manifest.xmland.dllfiles. For more information, see developer document . - Register an early access partner GUID for testing purposes.
How can I use registry keys correctly?
You should create registry keys based on the root hive. You can set the root hive as either
HKEY_LOCAL_MACHINEorHKEY_CURRENT_USERdepending on your purpose and the nature of the data. TheHKEY_LOCAL_MACHINEhive is used as an example in the guidelines.What are the requirements for Google's review of PC packages?
PC packages undergo malware scanning, after which reviewers test only the game installation, successful startup, and uninstallation processes.
Is it necessary to integrate all APIs?
Other APIs are not required, but they offer additional benefits.
google::play::billingis required for in-app purchases and selling digital content.google::play::install_referreris required for tracking referral data to help you understand which traffic sources send the most users to download your app.google::play::games::integrityis required to protect your app from bad actors by detecting potentially risky devices and unknown emulators.Why are some game processes terminated when the Google Play Games client is closed, while others are not?
Google doesn't control the sub processes or processes of the running game. The behavior depends on whether the game is an emulated Android game or a PC game. Emulated games are installed inside their own environment, so their behavior depends largely on emulator initialization and shutdown.
Should I use Google Play Games uninstallation capability or a custom uninstaller?
Google recommends using our Google Play Games uninstallation capability.
کمکهای بیشتر
If you need further help not covered in this FAQ, please reach out to google-play-games-pc@google.com
،This document answers common questions about SDKs and publishing for Google Play Games on PC.
کسب درآمد
Why does my purchase flow fail with Error Code 6 after adding a new billing or licensing key?
Newly generated licensing keys in the Google Play Console experience a multi-hour caching and propagation delay in the commerce backend before Google Play's internal caches synchronize across all serving environments. Even though your game client can query product details successfully, purchase requests will fail with Error Code 6 until synchronization completes. Allow several hours after uploading or updating your licensing key before testing purchases.
Can I use the purchase flow without a backend server?
From a security perspective, Google recommends using a backend server.
For more information, see Process without a backend server .
Are existing API-based payment systems allowed after integrating the Google Play Games on PC SDK?
All payments must be handled by Google Play Games on PC SDK using the Google Play Billing. You cannot use your existing API-based payment method in the same game.
How can we consume purchases in developer mode?
Consume purchase in the developer mode within 3 minutes, otherwise the purchase will be refunded.
Are recurring payments or subscriptions supported?
Not for the immediate future although you are welcome to provide specific use cases for us to add into our future roadmap.
What is the Billing Error in my purchase calls?
BillingError is the response of the payment result. LaunchPurchaseFlow will return immediately without blocking but you must listen to the callback in order to know when it has finished and to capture the result.
How can I use client-side purchase verification?
We recommend using server-side purchase and its verification process. Processing purchases from your client app requires your game to be on an allowlist. Please contact your Google Partner if your game requires access. For more information, see Process without a backend server .
What are the API limits for querying product details?
The maximum number of products that can be queried in a single call to the
QueryProductDetailsAPI is 50. If you exceed this limit, you must split the request into multiple calls.What parameters are required when calling Query Purchases or Launch Purchase Flow in the Billing Client?
The function accepts
QueryPurchasesContinuation, which is a function callback with thestd::function<void(QueryPurchasesResult)>signature. The callback passes the result to you with all theProductPurchaseDetails. This information is available in the SDK header files in theincludes/billing/models.hfile.The resulting
launch_purchase_flow_resulthasok()andcode()functions. Theok()function returns whether the flow is successful. Thecode()function returns theBillingErrorenum (includes/billing/enums.h), which has 10 possible error cases, such as user canceled or network error.Is a custom ordering supported for the Launch Purchase Flow in the Billing Client?
In the current SDK design, there is no way to pass in your own payload. However, you can provide any combination of
obfuscated_account_idandobfuscated_profile_id. You can provide none, just one, or both.The
offer_tokenfield is required and specifies the purchase offer that the user is attempting to buy in the checkout flow. For now, each SKU in Google Play has exactly one offer (for example, buy one item for $10). In the future, the Play billing team will provide support for multiple offers.To ensure metadata is associated in the case of purchase flow interruptions, store the metadata on your backend server prior to launching the purchase dialog and associate it with your user's account ID, the SKU being purchased, and the current timestamp. For more information, see Associate a purchase with internal data .
What are the prerequisites for switching from Google billing with OAuth to the DLL-based Google billing?
Games can continue to use the OAuth sign-in with Google to manage the signed-in account, but Google recommends that you stop using the legacy REST billing APIs. Switching from the REST billing APIs (with OAuth2 sign-in) to the SDK flow can be a feature-flagged operation, so both can coexist for a period of time while the game switches over.
Is the Launch Purchase Flow API call processed through a web browser?
No, the purchase flow is now completed entirely in-game using a seamless WebView overlay, without leaving the game client.
Does a user need to sign in separately for each game to make a purchase?
The foreground account in Google Play Games is used for each game session, so you don't need to sign in again. The account that you use in Google Play Games when the game session starts is the account that API calls are issued as. The purchase flow will use this account automatically.
Can a game support both the PC SDK and legacy payment systems at the same time?
The payment system operates under a dual-flow model depending on the game binary version. Users on legacy builds continue on the existing flow, and users on new builds transition to SDK-based payments. Users on both payment flows coexist during the transition period.
Windows App Bundle
When submitting a WAB using a 3P launcher, is the game package required for review?
You can just submit your installer and don't need to submit your entire game package, the reviewer will be able to download your game package using the installer.
Are there any limitations of WAB file size?
For Installer Publishing, you can upload up to 10 GB file size for a WAB. For Play Managed Publishing, the maximum WAB file size limit is 200 GB.
Why isn't my game installing or appearing after I uploaded my WAB?
If your game is being onboarded without a pre-existing PC version (a "first- time WAB"), the system may automatically place it into a Managed Publishing holding state. This happens because there is no existing baseline to update. To fully release the WAB and make the game available for installation, you must navigate to the Google Play Console and manually execute the required publish action (for example, click "Publish changes").
How do I upload the WAB for internal testing?
Share the allowlist accounts with Google so Google can enable them for internal testing. After Google has the list, Google makes sure they are included in the onboarding process.
Where should the WAB package be uploaded?
You can upload the WAB package at the location mentioned in the first question. However, you cannot publish it manually. You must provide the Google backend staff with a precise UTC time (down to the hour). Google then configures the release schedule and ensures it is published on time.
کیت توسعه نرمافزار کامپیوتر (SDK)
What are the differences between the Legacy API and Google Play Games on PC SDK?
- The legacy API only offers billing functionality.
- The PC SDK supports Google Desktop Service (GDS) and full PC features.
- No browser-based Google Sign-in is required with the PC SDK.
Is there an alternative way to initialize the SDK by launching the game directly using the game launcher, without going through Google Play Games on PC?
Your game must be launched through the Google Play Games on PC client. For more details, refer to this developer document .
Does the PC SDK support multibyte characters in the PEM certification file?
Yes, the SDK supports multibyte characters for certification.
How does the SDK handle Google Account sign-in for multiple instances or accounts?
Each game launch in Google Play Games is treated as a "game session" and each "game session" can have an account associated with it. They can be different. So if you launch the game with account A, and then switch to account B and relaunch both can run at the same time.
Does the Play Install Referrer integration work with the PC SDK?
The PC SDK (25.5.409.0 and higher) supports the Play Install Referrer API. For more information, see Play Install Referrer API .
پرتابگر
If a player uses a 3P launcher instead of the Google Play Client, will their Play Games Services account sync automatically?
For the SDK functions to operate, the game must be launched directly through the Google Play Games client. If another process, such as an installer or launcher application, initiates the game, then that process must itself be launched from the Google Play Games client. The game must pass all parameters received from the client to the client process.
How do I handle initialization if Google Play Games launches a third-party game launcher?
You are not required to integrate the SDK directly into your launcher. However, you must pass all command-line arguments received by the launcher from the Google Play Games client directly to the spawned child process (the game executable). If initialization fails (for example, by returning
kActionRequiredShutdownClientProcess), all processes including the launcher must be terminated so Google Play Games can attempt to recover and relaunch the game automatically. For more details, see Step 5 in the setup guide .How can I handle updates and maintenance to my game and launcher after it is in production?
Subsequent updates and maintenance must be implemented through your launcher. The Google Play Games client does not support update functions, so the launcher must be capable of updating both the game and the launcher itself.
How does the installer receive the GPG session token for Auto-Play?
GPG passes the session token using the
--g_session_token=<token>command-line argument to the installer. To enable this, you must setacceptsCommandLineArguments="true"in yourplay_publishing_config.xml.The installer is responsible for extracting this token and using it to launch the game. If the token generation fails, GPG launches the installer without the token (fallback).
مقداردهی اولیه
When I start a game using the Google Play Games app, does it sync my Google Account details?
After launching the game through Google Play Games client, the account is automatically synchronized and there's no need to login through the Google Login process again.
Is it possible to reuse the initialization parameters multiple times?
This is possible as long as the Google Play Games client is running and the login information is valid. However, in scenarios like the one described in the guide, all processes launched by the game must be terminated when the user closes the game or the game exits due to an SDK initialization failure, such as
kActionRequiredShutdownClientProcess.Is there any way to create a shortcut to open the game directly?
You can use the following URI for opening the game directly:
googleplaygames://launch/?pid=2&id=com.company.gamenameThe URI supports detecting whether the Google Play Games on PC client is opened. If the client is not open, the Google Play Games client opens before the game or launcher runs. You need to manage the game or launcher to prevent multiple instances from running.
Is there any way to verify the Google Play Games on PC installation without using the SDK?
You can verify the installation status of Google Play Games on PC without integrating the SDK by checking for the presence of the following Windows Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Google\Play Games ServicesThe presence of this key indicates that the Google Play Games services (required to run games on PC) are installed on the machine. If the key is missing, you should direct the user to the Google Play Games on PC installation page to download and install the client.
آزمایش
Are there any open testing or closed testing environments similar to the mobile?
While a dedicated end-to-end sandbox isn't available, we recognize the need for a production-like testing environment for developers. A more robust solution will be offered soon.
How can I add new testers?
Your Google point of contact creates an email group for each PC project, where the testers' Google Accounts must be added. Only members of this email group are authorized to download the test packages within Google Play Games.
متفرقه
آیا میتوانم از VPN استفاده کنم؟
For developers requiring to test their game in regions where Google Play Games on PC is not supported, we recommend that you use a VPN to acquire an IP address from a supported region .
Ensure that you enable TUN mode on VPN. Guidance on enabling TUN mode and configuring the firewall can be found in the VPN provider's operating manual.
After the TUN mode is enabled, install the Google Play Games on PC and the emulator for testing purposes.
How can I start developing for Google Play Games on PC in Unity or UE Editor?
- Enable the developer Mode and proceed with testing.
- Add the
manifest.xmland.dllfiles. For more information, see developer document . - Register an early access partner GUID for testing purposes.
How can I use registry keys correctly?
You should create registry keys based on the root hive. You can set the root hive as either
HKEY_LOCAL_MACHINEorHKEY_CURRENT_USERdepending on your purpose and the nature of the data. TheHKEY_LOCAL_MACHINEhive is used as an example in the guidelines.What are the requirements for Google's review of PC packages?
PC packages undergo malware scanning, after which reviewers test only the game installation, successful startup, and uninstallation processes.
Is it necessary to integrate all APIs?
Other APIs are not required, but they offer additional benefits.
google::play::billingis required for in-app purchases and selling digital content.google::play::install_referreris required for tracking referral data to help you understand which traffic sources send the most users to download your app.google::play::games::integrityis required to protect your app from bad actors by detecting potentially risky devices and unknown emulators.Why are some game processes terminated when the Google Play Games client is closed, while others are not?
Google doesn't control the sub processes or processes of the running game. The behavior depends on whether the game is an emulated Android game or a PC game. Emulated games are installed inside their own environment, so their behavior depends largely on emulator initialization and shutdown.
Should I use Google Play Games uninstallation capability or a custom uninstaller?
Google recommends using our Google Play Games uninstallation capability.
کمکهای بیشتر
If you need further help not covered in this FAQ, please reach out to google-play-games-pc@google.com