Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Karena Google Play Game di PC menyediakan lingkungan runtime Android standar,
tidak ada perbedaan antara memaketkan game untuk perangkat seluler atau PC selain
memastikan bahwa Anda menyertakan biner x86 atau x86-64. Jika memungkinkan, Anda harus menggunakan
APK atau App Bundle yang sama di PC seperti yang Anda gunakan untuk build
versi seluler.
Saat menggunakan satu paket di seluruh perangkat seluler dan Google Play Game di PC, sebaiknya
aktifkan fitur khusus Google Play Game di PC saat runtime dengan
mendeteksi kehadiran keyboard:
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Package a game for Google Play Games on PC\n\nSince Google Play Games on PC provides a standard Android runtime environment,\nthere are no differences between packing your game for mobile or PC outside of\nensuring that you include x86 or x86-64 binaries. When possible, you should use\nthe same APK or [App Bundle](/guide/app-bundle) on PC as you do for mobile\nbuilds.\n\nWhen using one package across mobile and Google Play Games on PC, it is best to\nenable Google Play Games on PC specific features at runtime either by\n[detecting the presence of a keyboard](/games/develop/all-screens#handle-interaction-models):\n\n\u003cbr /\u003e\n\n### Kotlin\n\n\u003cbr /\u003e\n\n val hasKeyboard = resources.configuration.keyboard == KEYBOARD_QWERTY\n\n\u003cbr /\u003e\n\n### Java\n\n\u003cbr /\u003e\n\n boolean hasKeyboard = getResources().getConfiguration().keyboard == KEYBOARD.QWERTY\n\n\u003cbr /\u003e\n\n### C#\n\n\u003cbr /\u003e\n\n var unityPlayerClass = new AndroidJavaClass(\"com.unity3d.player.UnityPlayer\");\n var currentActivity = unityPlayerClass.GetStatic\u003cAndroidJavaObject\u003e(\"currentActivity\");\n var resources = currentActivity.Call\u003cAndroidJavaObject\u003e(\"getResources\");\n var configuration = resources.Call\u003cAndroidJavaObject\u003e(\"getConfiguration\");\n var keyboard = configuration.Get\u003cint\u003e(\"keyboard\");\n var hasKeyboard == 2; // Configuration.KEYBOARD_QWERTY\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOr by checking for the `\"com.google.android.play.feature.HPE_EXPERIENCE\"` system\nfeature: \n\n### Kotlin\n\n```kotlin\nvar isPC = packageManager.hasSystemFeature(\"com.google.android.play.feature.HPE_EXPERIENCE\")\n \n```\n\n### Java\n\n```java\nPackageManager pm = getPackageManager();\nboolean isPC = pm.hasSystemFeature(\"com.google.android.play.feature.HPE_EXPERIENCE\")\n \n```\n\n### C#\n\n```c#\nvar unityPlayerClass = new AndroidJavaClass(\"com.unity3d.player.UnityPlayer\");\nvar currentActivity = unityPlayerClass.GetStatic\u003cAndroidJavaObject\u003e(\"currentActivity\");\nvar packageManager = currentActivity.Call\u003cAndroidJavaObject\u003e(\"getPackageManager\");\nvar isPC = packageManager.Call\u003cbool\u003e(\"hasSystemFeature\", \"com.google.android.play.feature.HPE_EXPERIENCE\");\n \n```"]]