ตัวอย่างโค้ดของ Navigation SDK สำหรับ Android
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ที่เก็บตัวอย่างใน GitHub ของ Navigation SDK สำหรับ Android
มีแอปตัวอย่างที่แสดงการใช้ SDK คุณสามารถนำเข้าและ
สร้างแอป เพิ่มคีย์ API ดูการสาธิต และใช้โค้ดตัวอย่าง
ที่ให้ไว้เป็นจุดเริ่มต้นสำหรับแอปของคุณได้ โดยที่เก็บมีแอปตัวอย่าง 2 แอป ดังนี้
- Map-sample ซึ่งเป็นตัวอย่าง UI ของ MapView และ NavView
android-navigation-samples/map-sample/
- Navigation-sample ประสบการณ์การนำทางพื้นฐาน
android-navigation-samples /navigation-sample/
ดูข้อมูลเพิ่มเติมเกี่ยวกับการเรียกใช้แอปตัวอย่างได้ที่ลองใช้
เดโม
Codelab ของ Navigation SDK สำหรับ Android
ดูวิธีใช้ Navigation SDK โดยการสร้างแอป Android อย่างง่ายได้ที่
Codelab ของ Navigation SDK สำหรับ Android
Codelab มีคำแนะนำแบบทีละขั้นตอนสำหรับการติดตั้งใช้งาน SDK โดยใช้ Kotlin
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eThe Navigation SDK for Android provides sample apps on GitHub that demonstrate the use of the SDK, allowing developers to import, build, and explore the code.\u003c/p\u003e\n"],["\u003cp\u003eThe repository features two key samples: "Map-sample" focusing on MapView and NavView UI, and "Navigation-sample" showcasing the core navigation experience.\u003c/p\u003e\n"],["\u003cp\u003eA dedicated Codelab offers a step-by-step guide to build a simple Android app using the Navigation SDK with Kotlin, aiding developers in practical implementation.\u003c/p\u003e\n"]]],[],null,["# Navigation SDK for Android code samples\n\nThe Navigation SDK for Android [samples repository on\nGitHub](https://github.com/googlemaps-samples/android-navigation-samples)\nincludes sample apps that demonstrate the use of the SDK. You can import and\nbuild the apps, add your API key, view the demo, and use the sample code\nsupplied as a starting point for your app. The repository contains two sample\napps:\n\n- **Map-sample** , a showcase of the MapView and NavView UI: `android-navigation-samples/map-sample/`\n- **Navigation-sample** , The fundamental navigation experience: `android-navigation-samples /navigation-sample/`\n\nFor more information about running the sample apps, see [Try the\ndemo](/maps/documentation/navigation/android-sdk/try-demo).\n\nNavigation SDK for Android Codelab\n----------------------------------\n\nTo learn how to use the Navigation SDK by building a simple Android app, see the\n[Navigation SDK for Android\nCodelab](https://codelabs.developers.google.com/codelabs/maps-platform/navigation-sdk-101-android).\nThe Codelab provides a step-by-step guide for implementing the SDK using Kotlin."]]