2015-05-01 12:51:21 -07:00
|
|
|
page.title=Samples
|
2015-05-23 14:46:57 -07:00
|
|
|
page.image=images/cards/card-samples_16-9_2x.png
|
2015-05-01 12:51:21 -07:00
|
|
|
@jd:body
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The following code samples are provided for the M Developer Preview. You can download them in the
|
|
|
|
Android SDK Manager under the <b>SDK Samples</b> component for the M Developer Preview.
|
|
|
|
</p>
|
|
|
|
|
2015-05-23 14:46:57 -07:00
|
|
|
<img src="{@docRoot}images/cards/card-google-cloud-messaging_16-9_2x" class="figure">
|
2015-05-01 12:51:21 -07:00
|
|
|
<p class="note">
|
|
|
|
<strong>Note:</strong> These downloadable projects are designed
|
|
|
|
for use with Gradle and Android Studio.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
2015-05-15 15:42:17 -07:00
|
|
|
<h3 id="RuntimePermissions">Runtime Permissions</h3>
|
2015-05-01 12:51:21 -07:00
|
|
|
|
|
|
|
<p>
|
2015-05-15 15:42:17 -07:00
|
|
|
Android M changes the way system permissions work. Users are asked to approve permission
|
|
|
|
requests at runtime instead of during installation. This sample shows how to request these
|
|
|
|
permissions.
|
2015-05-01 12:51:21 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-15 15:42:17 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-RuntimePermissions">Get it on GitHub</a></p>
|
2015-05-01 12:51:21 -07:00
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<h3 id="ConfirmCredentials">Confirm Device Credentials</h3>
|
2015-05-01 12:51:21 -07:00
|
|
|
|
2015-05-15 15:42:17 -07:00
|
|
|
<p>
|
2015-05-12 13:21:34 -07:00
|
|
|
This sample demonstrates how to use device credentials as an authentication method in your app.
|
2015-05-15 15:42:17 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-ConfirmDeviceCredentials">Get it on
|
2015-05-15 15:42:17 -07:00
|
|
|
GitHub</a></p>
|
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<h3 id="FingerprintDialog">Fingerprint Dialog</h3>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
|
|
|
<p>
|
2015-05-12 13:21:34 -07:00
|
|
|
This sample demonstrates how to recognize registered fingerprints to authenticate the user
|
|
|
|
in your app.
|
2015-05-15 15:42:17 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-FingerprintDialog">Get it on GitHub</a></p>
|
|
|
|
|
|
|
|
<h3 id="AutomaticBackup">Automatic Backup</h3>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Android M introduces automatic backup for app settings. This sample demonstrates how to add
|
|
|
|
filtering rules to an app in order to manage settings backup.
|
|
|
|
</p>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-AutomaticBackup">Get it on GitHub</a></p>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<h3 id="VoiceCamera">Voice Camera</h3>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
|
|
|
<p>
|
2015-05-12 13:21:34 -07:00
|
|
|
This sample demonstrates how to implement the "OK Google, take a selfie" voice command and confirm
|
|
|
|
the user intent with the <code>VoiceInteraction</code> API.
|
2015-05-15 15:42:17 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-VoiceCamera">Get it on GitHub</a></p>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<h3 id="CameraRaw">Camera 2 Raw</h3>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
|
|
|
<p>
|
2015-05-12 13:21:34 -07:00
|
|
|
Demonstrates how to use the <code>Camera2</code> API to capture RAW camera buffers and save
|
|
|
|
them as <code>DNG</code> files.
|
2015-05-15 15:42:17 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-12 13:21:34 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-Camera2Raw">Get it on GitHub</a></p>
|
2015-05-15 15:42:17 -07:00
|
|
|
|
|
|
|
<h3 id="ActiveNotification">Active Notification</h3>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
This sample demonstrates how the
|
|
|
|
<a href="{@docRoot}reference/android/app/NotificationManager.html"><code>NotificationManager</code></a>
|
|
|
|
can tell you how many notifications your app is currently showing.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p><a href="https://github.com/googlesamples/android-ActiveNotification">Get it on GitHub</a></p>
|
|
|
|
|
|
|
|
<h3 id="VoiceSynthesizer">Voice Synthesizer</h3>
|
2015-05-01 12:51:21 -07:00
|
|
|
|
|
|
|
<p>
|
2015-05-15 15:42:17 -07:00
|
|
|
This sample demonstrates how to use the <code>NativeAudio</code> APIs to demonstrate low-latency
|
|
|
|
audio processing.
|
2015-05-01 12:51:21 -07:00
|
|
|
</p>
|
|
|
|
|
2015-05-15 15:42:17 -07:00
|
|
|
<p><a href="https://github.com/googlesamples/android-VoiceSynthesizer">Get it on GitHub</a></p>
|
2015-05-01 12:51:21 -07:00
|
|
|
|
|
|
|
|