Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 1 | page.title=Samples |
Dirk Dougherty | ea1f6fb | 2015-05-26 20:31:12 -0700 | [diff] [blame] | 2 | page.image=images/cards/samples-new_2x.png |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 3 | @jd:body |
| 4 | |
| 5 | <p> |
Luan Nguyen | 1694401 | 2015-05-27 08:51:32 -0700 | [diff] [blame] | 6 | The following code samples are provided for the M Developer Preview. To download |
| 7 | the samples in Android Studio, select the <b>File > Import Samples</b> menu option. |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 8 | </p> |
| 9 | |
Dirk Dougherty | 10d44b7 | 2015-05-23 14:46:57 -0700 | [diff] [blame] | 10 | <img src="{@docRoot}images/cards/card-google-cloud-messaging_16-9_2x" class="figure"> |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 11 | <p class="note"> |
| 12 | <strong>Note:</strong> These downloadable projects are designed |
| 13 | for use with Gradle and Android Studio. |
| 14 | </p> |
| 15 | |
| 16 | |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 17 | <h3 id="RuntimePermissions">Runtime Permissions</h3> |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 18 | |
| 19 | <p> |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 20 | Android M changes the way system permissions work. Users are asked to approve permission |
| 21 | requests at runtime instead of during installation. This sample shows how to request these |
| 22 | permissions. |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 23 | </p> |
| 24 | |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 25 | <p><a href="https://github.com/googlesamples/android-RuntimePermissions">Get it on GitHub</a></p> |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 26 | |
Luan Nguyen | 298b0f2 | 2015-05-27 11:51:14 -0700 | [diff] [blame^] | 27 | <h3 id="ConfirmCredentials">Confirm Credential</h3> |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 28 | |
| 29 | <p> |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 30 | This sample demonstrates how to use device credentials as an authentication method in your app. |
Joe Fernandez | 306f1ce | 2015-05-01 12:51:21 -0700 | [diff] [blame] | 31 | </p> |
| 32 | |
Luan Nguyen | 298b0f2 | 2015-05-27 11:51:14 -0700 | [diff] [blame^] | 33 | <p><a href="https://github.com/googlesamples/android-ConfirmCredential">Get it on |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 34 | GitHub</a></p> |
| 35 | |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 36 | <h3 id="FingerprintDialog">Fingerprint Dialog</h3> |
| 37 | |
| 38 | <p> |
| 39 | This sample demonstrates how to recognize registered fingerprints to authenticate the user |
| 40 | in your app. |
| 41 | </p> |
| 42 | |
| 43 | <p><a href="https://github.com/googlesamples/android-FingerprintDialog">Get it on GitHub</a></p> |
| 44 | |
Luan Nguyen | 1694401 | 2015-05-27 08:51:32 -0700 | [diff] [blame] | 45 | <h3 id="AutomaticBackup">Auto Backup for Apps</h3> |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 46 | |
| 47 | <p> |
| 48 | Android M introduces automatic backup for app settings. This sample demonstrates how to add |
| 49 | filtering rules to an app in order to manage settings backup. |
| 50 | </p> |
| 51 | |
Luan Nguyen | 1694401 | 2015-05-27 08:51:32 -0700 | [diff] [blame] | 52 | <p><a href="https://github.com/googlesamples/android-AutoBackupForApps">Get it on GitHub</a></p> |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 53 | |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 54 | <h3 id="VoiceCamera">Voice Camera</h3> |
| 55 | |
| 56 | <p> |
| 57 | This sample demonstrates how to implement the "OK Google, take a selfie" voice command and confirm |
| 58 | the user intent with the <code>VoiceInteraction</code> API. |
| 59 | </p> |
| 60 | |
| 61 | <p><a href="https://github.com/googlesamples/android-VoiceCamera">Get it on GitHub</a></p> |
| 62 | |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 63 | <h3 id="CameraRaw">Camera 2 Raw</h3> |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 64 | |
| 65 | <p> |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 66 | Demonstrates how to use the <code>Camera2</code> API to capture RAW camera buffers and save |
| 67 | them as <code>DNG</code> files. |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 68 | </p> |
| 69 | |
Luan Nguyen | 98ebcef | 2015-05-12 13:21:34 -0700 | [diff] [blame] | 70 | <p><a href="https://github.com/googlesamples/android-Camera2Raw">Get it on GitHub</a></p> |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 71 | |
Luan Nguyen | 1694401 | 2015-05-27 08:51:32 -0700 | [diff] [blame] | 72 | <h3 id="ActiveNotification">Active Notifications</h3> |
Joe Fernandez | a06ac3a | 2015-05-15 15:42:17 -0700 | [diff] [blame] | 73 | |
| 74 | <p> |
| 75 | This sample demonstrates how the |
| 76 | <a href="{@docRoot}reference/android/app/NotificationManager.html"><code>NotificationManager</code></a> |
| 77 | can tell you how many notifications your app is currently showing. |
| 78 | </p> |
| 79 | |
Luan Nguyen | 1694401 | 2015-05-27 08:51:32 -0700 | [diff] [blame] | 80 | <p><a href="https://github.com/googlesamples/android-ActiveNotifications">Get it on GitHub</a></p> |