The Android M release is coming.
And Android developers across the globe
are busy testing their apps against the developer preview.
If you've not joined them yet, then now
is the perfect opportunity.
I'm Rich Hyndman, and this is a quick guide to the M Developer
Preview, the core features you should be testing,
and a couple of new APIs to look out
for, along with how to provide feedback to us.
Let's jump right in.
The M Developer Preview consists of SDK tools, emulators,
device images, documentation, and sample code,
and you can get it all from developer.android.com/preview.
If you're anything like me, you're
going to want to get a device image up and running first.
So if you've got a Nexus 5, 6, 9, or Nexus player,
you probably followed the link to the Downloads page
already and got your device image.
Stop.
I wish we could dive straight into that,
but if you're not running the preview version of the SDK
Tools, you may run into a missing system.img error.
So let's get the SDK first.
If you don't already have Android Studio installed
or would like a separate instance for the preview,
then go to developer.android.com/sdk
to download the current version.
Then you're going to open up the Preferences or Settings
depending on your OS.
Go to Appearance and Behavior, System Settings, and Updates.
Switch it over to check for studio updates
from the Canary Channel and SDK updates from the Preview
Channel, hit Check Now, and wait for the magic.
Android Studio is going to update and restart,
then you can head back into Settings
and you'll be able to update to the new SDK
platform, and the all important Preview SDK Tools.
Also, at the same time pick up the new support repository.
And you're all ready to go.
If you're starting a new project,
you can now choose Target SDK M Preview.
Otherwise, update your grade or build
files to use Android MNC as your compile SDK version.
You could also head into the AVD manager and set up an emulator.
Select a device of your choice, and use the MNC x86
image for the best performance.
And finally we can get back to flashing our devices.
So now ensure your data's backed up,
and follow the steps in the preview guide.
If your boot loader's locked, then you're
going to have to unlock it first, which means on a Nexus 6
or Nexus 9 first checking in the developer options
that OEM unlocking is enabled.
Then use ADB to reboot into boot loader,
run fast boot OEM unlock, and get your system images,
and execute the flash-all script.
To be secure, it's recommended once
that's done to lock your boot loader again.
It should be smooth sailing, and if you do hit that missing
system.img error, then double check
you're definitely using the latest [? fast boot ?]
from the Preview SDK Tools.
Now, you have an Android M Preview device or emulator
ready for testing.
As always with new releases, we have some changes in behavior
that we recommend you test out.
So please head straight over to the Behavior Changes page.
First and foremost, it's the new runtime permissions model.
Runtime permissions are here.
They provide less friction on install and automatic app
updates.
But you can no longer assume that just
because your app's installed, it has all the stated
permissions granted.
Permissions are now granted at run time
and users can also revoke permissions
on a per app basis at any time, even for legacy apps.
For testing, we have all new ADB commands and parameters
for granting and revoking permissions.
So check out the permissions guide on the preview
site for details.
Always check that you have a permission
before trying to use it, and if you don't, request it.
If there's a set of permissions that your app needs,
like camera access for a camera app,
then it can be worth requesting them upfront in a warm welcome.
Next, Android Auto Backup.
This is a new service designed to simplify
building a robust data backup service
and to improve the lives of users.
Up to 25 megabytes of data is backed up per application,
and you can watch Matthew's video for full details.
If your project targets [? M, ?] then
backup's going to be automatically enabled,
and there are a couple of things you should be aware of.
If you have any data you don't want backed up,
like device specific or encrypted data,
then you can move it into the Get No Backup Files directory.
You can now also specify an inclusive or exclusive
backup scheme or potentially opt out of backup all together.
For testing, there are new ADB shell backup manager commands.
And in the M Preview Build, auto backup
is enabled for all applications.
For the actual final M release, we're
only going to do it for apps that target M or higher.
It's also worth mentioning that for testing the new fingerprint
APIs, we've added a new ADB finger touch command,
and that's going to simulate fingerprint input.
Check out the preview site and Maya's video for full details.
Finally, some good news, this year we'll be making updates
to the SDK and device images throughout the preview,
so join the developer preview community
on +AndroidDevelopers, and you only need to flash your device
once, as once you've flashed the [? dev ?] preview system image,
it's going to automatically be upgraded over the year.
So please, do check out the preview for other features
like doze, app standby, adoptable storage,
data binding, and the very powerful app linking.
Test early.
Join the Android M Developer Community.
File bugs in the issue tracker.
Enjoy another tasty treat.