ทดสอบการส่งเนื้อหา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้ขั้นตอนในคู่มือนี้เพื่อทดสอบว่าแอปของคุณผสานรวมการนำส่งเนื้อหา Play อย่างไร
ในการเรียกใช้ Asset Pack ได้
การทดสอบในเครื่อง
Play Asset Delivery รองรับการทดสอบในเครื่องโดยการติดตั้งเวอร์ชันใหม่ของ
เกมที่ใช้ bundletool
ใช้การทดสอบในเครื่อง
เพื่อการดำเนินการซ้ำๆ อย่างรวดเร็วเนื่องจากไม่จำเป็นต้องอัปโหลดเกมไปยัง Google
เซิร์ฟเวอร์ Play ขั้นตอนที่คุณต้องทำจะขึ้นอยู่กับว่าคุณ
กำลังพัฒนาใน Java, เนทีฟ หรือ Unity
Java หรือเนทีฟ
ทำตามขั้นตอนต่อไปนี้เพื่อทดสอบแอปในเครื่อง
สร้าง App Bundle
สร้าง APK ที่มีแฟล็ก --local-testing
:
java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \
--output=output.apks --local-testing
เชื่อมต่ออุปกรณ์และเรียกใช้ bundletool
เพื่อโหลด APK จากแหล่งที่ไม่รู้จัก
java -jar bundletool.jar install-apks --apks=output.apks
เอกภาพ
ในเครื่องมือแก้ไข Unity ให้เลือก Google > สร้างและเรียกใช้
ลักษณะการทำงาน
ระบบจะติดตั้ง install-time
แพ็กในระหว่างขั้นตอนการติดตั้งแอป
fast-follow
แพ็กจะทำงานเหมือน on-demand
แพ็ก กล่าวคือ พวกเขาจะไม่ได้
ดึงข้อมูลโดยอัตโนมัติเมื่อเกมโหลดจากแหล่งที่ไม่รู้จัก นักพัฒนาแอปต้องส่งคำขอ
ด้วยตนเองเมื่อเกมเริ่ม ไม่จำเป็นต้องเปลี่ยนแปลงโค้ดใดๆ ใน
แอปของคุณ
ข้อจำกัด
ข้อจำกัดของการทดสอบในเครื่องมีดังนี้
- แพ็กจะดึงข้อมูลจากที่จัดเก็บข้อมูลภายนอกแทน Play คุณจึงทดสอบไม่ได้
ว่าโค้ดทำงานอย่างไรในกรณีที่เกิดข้อผิดพลาดเกี่ยวกับเครือข่าย
- การทดสอบในเครื่องไม่ครอบคลุมสถานการณ์การรอ Wi-Fi
- ไม่รองรับการอัปเดต ก่อนที่จะติดตั้งเวอร์ชันใหม่ของ
ถอนการติดตั้งเวอร์ชันก่อนหน้าด้วยตนเอง
การทดสอบด้วยการแชร์แอปภายใน
เมื่อใกล้จะมีผู้สมัครเพื่อเปิดตัว ให้ทดสอบ
เกมของคุณโดยใช้การกำหนดค่าที่สมจริงมากที่สุด เพื่อให้มั่นใจว่าเกมจะทำงาน
สำหรับผู้ใช้ในเวอร์ชันที่ใช้งานจริง เพื่อตรวจสอบความถูกต้อง คุณสามารถใช้
การแชร์แอปภายใน
เพื่อรับลิงก์ที่แชร์ได้
ซึ่งคุณสามารถนำไปใช้ดาวน์โหลดเกมจาก Play
จะมีลักษณะการทำงานเดียวกันกับผู้ใช้ของคุณเมื่อเล่นเกม
เผยแพร่ไปยัง Play Store
หากต้องการทดสอบการนำส่งเนื้อหาโดยใช้การแชร์แอปภายใน ให้ทำดังนี้
- สร้าง App Bundle
- ทำตามวิธีการของ Play Console
แชร์แอปของคุณภายใน
- ในอุปกรณ์ทดสอบ ให้คลิกลิงก์การแชร์แอปภายในสำหรับเวอร์ชันของ
แอปที่คุณเพิ่งอัปโหลดไป
- ติดตั้งแอปจากหน้า Google Play Store ที่คุณเห็นหลังจากคลิก
ลิงก์
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 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-27 UTC"],[],[],null,["# Test asset delivery\n\nUse the steps in this guide to test how your app integrates Play Asset Delivery\nto retrieve asset packs.\n\nLocal testing\n-------------\n\nPlay Asset Delivery supports local testing by installing a new version of the\ngame using [`bundletool`](/studio/command-line/bundletool). Use local testing\nfor quick, iterative cycles as it avoids the need to upload the game to Google\nPlay servers. The steps you need to take depend on whether you're\ndeveloping in Java, native, or Unity.\n\n- [Java](#steps-native-java)\n- [Native](#steps-native-java)\n- [Unity](#steps-unity)\n\n### Java or native\n\nFollow these steps to test your app locally:\n\n1. [Build your app bundle](/guide/playcore/asset-delivery#next-step-instructions).\n\n2. Generate APKs with the `--local-testing` flag:\n\n ```\n java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \\\n --output=output.apks --local-testing\n ```\n3. Connect a device and run `bundletool` to sideload the APKs:\n\n ```\n java -jar bundletool.jar install-apks --apks=output.apks\n ```\n\n### Unity\n\nIn the Unity Editor, select **Google \\\u003e Build and Run**.\n\n### Behavior\n\n`install-time` packs will be installed during the app installation process.\n\n`fast-follow` packs behave as `on-demand` packs. That is, they won't be\nautomatically fetched when the game is sideloaded. Developers need to request\nthem manually when the game starts; this does not require any code changes in\nyour app.\n\n### Limitations\n\nThe following are limitations of local testing:\n\n- Packs fetch from external storage instead of Play, so you cannot test how your code behaves in the case of network errors.\n- Local testing does not cover the wait-for-Wi-Fi scenario.\n- Updates are not supported. Before installing a new version of your build, manually uninstall the previous version.\n\nTesting with internal app sharing\n---------------------------------\n\nAs you get closer to having a release candidate, test\nyour game using as realistic a configuration as possible to make sure that your game will perform\nwell for your users in production. To validate this, you can use\n[internal app sharing](https://support.google.com/googleplay/android-developer/answer/9303479)\nto get a sharable link that you can use to download the game from Play while\ngetting the exact same behaviour as your users will once the game is\npublished to the Play Store.\n\nTo test Asset Delivery using internal app sharing, do the following:\n\n1. Build your app bundle.\n2. Follow the Play Console instructions on how to [share your app internally](https://support.google.com/googleplay/android-developer/answer/9303479).\n3. On the test device, click the internal app-sharing link for the version of your app you just uploaded.\n4. Install the app from the Google Play Store page you see after clicking the link."]]