Mẫu Android 6.0
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tải xuống hoặc duyệt qua các dự án mẫu để bắt đầu sử dụng API Android 6.0 (API cấp 23). Bạn có thể tải các mẫu xuống trực tiếp từ Android Studio — chỉ cần chọn tuỳ chọn trình đơn File > New > Import Sample (Tệp > Mới > Nhập mẫu) rồi chọn mẫu bạn muốn.
Lưu ý: Các dự án có thể tải xuống này được thiết kế để sử dụng với Gradle và Android Studio.
-
Camera2Basic: Mẫu này minh hoạ cách sử dụng API
Camera2
để chụp vùng đệm máy ảnh RAW và lưu các vùng đệm đó dưới dạng tệp DNG
.
- DeviceOwner: Mẫu này minh hoạ cách sử dụng các tính năng của chủ sở hữu thiết bị để quản lý và định cấu hình thiết bị.
-
Xác thực bằng sinh trắc học: Mẫu này minh hoạ cách nhận dạng vân tay đã đăng ký để xác thực người dùng ứng dụng.
-
MidiScope: Mẫu này minh hoạ cách sử dụng MIDI API để nhận và xử lý tín hiệu MIDI từ một thiết bị đầu vào được đính kèm.
-
MidiSynth: Mẫu này minh hoạ cách sử dụng MIDI API để nhận và phát thông báo MIDI từ một thiết bị đầu vào được đính kèm.
-
Cung cấp NFC: Mẫu này minh hoạ cách sử dụng NFC để cung cấp các thiết bị khác cho một chủ sở hữu thiết bị cụ thể.
-
RuntimePermissions: Mẫu này cho thấy các quyền khi bắt đầu chạy có trong Android 6.0 (API cấp 23) trở lên. Hiển thị
nhật ký trên màn hình để theo dõi quá trình thực thi. Nếu được thực thi trên thiết bị Android 6.0, ứng dụng sẽ hiển thị thêm một tuỳ chọn để truy cập vào danh bạ bằng quyền không bắt buộc chỉ dành cho Android 6.0.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Android 6.0 Samples\n\nDownload or browse sample projects to get started with Android 6.0\nAPIs (API level 23). You can download the samples\ndirectly from Android Studio --- just select the **File \\\u003e New \\\u003e Import\nSample** menu option and pick the sample you want.\n\n\n**Note:** These downloadable projects are designed\nfor use with Gradle and Android Studio.\n\n- [Camera2Basic](https://github.com/android/camera-samples/tree/main/Camera2Basic#readme): This sample demonstrates how to use the `Camera2` API to capture RAW camera buffers and save them as `DNG` files.\n- [DeviceOwner](https://github.com/googlearchive/android-DeviceOwner): This sample demonstrates how to use the device owner features to manage and configure a device.\n- [Biometric\n Authentication](https://github.com/android/security-samples/tree/main/BiometricAuthentication/#readme): This sample demonstrates how to recognize registered fingerprints to authenticate your app's user.\n- [MidiScope](https://github.com/android/media-samples/tree/main/MidiScope): This sample demonstrates how to use the [MIDI API](/reference/android/media/midi/package-summary) to receive and process MIDI signals coming from an attached input device.\n- [MidiSynth](https://github.com/android/media-samples/tree/main/MidiSynth): This sample demonstrates how to use the [MIDI API](/reference/android/media/midi/package-summary) to receive and play MIDI messages coming from an attached input device.\n- [NFC Provisioning](https://github.com/googlearchive/android-NfcProvisioning): This sample demonstrates how to use NFC to provision other devices with a specific device owner.\n- [RuntimePermissions](https://github.com/googlesamples/android-RuntimePermissions): This sample shows runtime permissions available in Android 6.0 (API level 23) and higher. Display the log on screen to follow the execution. If executed on an Android 6.0 device, the app displays an additional option to access contacts using an 6.0-only optional permission."]]