דוגמאות ל-Android 6.0
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אתם יכולים להוריד פרויקטים לדוגמה או לעיין בהם כדי להתחיל לעבוד עם ממשקי API של Android 6.0 (רמת API 23). אפשר להוריד את הדוגמאות ישירות מ-Android Studio. לשם כך, בוחרים באפשרות התפריט קובץ > חדש > ייבוא דוגמה ובוחרים את הדוגמה הרצויה.
הערה: הפרויקטים שניתן להורדה מיועדים לשימוש עם Gradle ו-Android Studio.
-
Camera2Basic: הדוגמה הזו ממחישה איך משתמשים ב-API
Camera2
כדי לצלם מאגרי נתונים של מצלמה בפורמט RAW ולשמור אותם כקובצי DNG
.
- DeviceOwner: דוגמה שמראה איך להשתמש בתכונות של הבעלים של המכשיר כדי לנהל מכשיר ולהגדיר אותו.
-
אימות ביומטרי: הדוגמה הזו מראה איך לזהות טביעות אצבע רשומות כדי לאמת את המשתמש באפליקציה.
-
MidiScope: הדוגמה הזו ממחישה איך משתמשים ב-MIDI API כדי לקבל ולעבד אותות MIDI שמגיעים ממכשיר קלט מחובר.
-
MidiSynth: דוגמה שמראה איך להשתמש ב-MIDI API כדי לקבל ולנגן הודעות MIDI שמגיעות ממכשיר קלט מחובר.
-
הקצאה באמצעות NFC: דוגמה שמראה איך להשתמש ב-NFC כדי להקצות מכשירי אחרים לבעלים ספציפי של מכשיר.
-
RuntimePermissions:
הדוגמה הזו מציגה הרשאות בסביבת זמן ריצה שזמינות ב-Android 6.0 (רמת API 23) ואילך. מציגים את היומן במסך כדי לעקוב אחרי הביצוע. אם הפעולה מתבצעת במכשיר עם Android מגרסה 6.0, באפליקציה תוצג אפשרות נוספת לגשת לאנשי הקשר באמצעות הרשאה אופציונלית שזמינה רק ב-6.0.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. 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,["# 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."]]