Android N has many new features that will appeal to both Android users and software developers. This is, of course, an early preview, and it’s possible that some of these features won’t make it into the final release. Perhaps the most visible new feature for end users is native support for split-screen view. This feature is great for users, but will mean some additional work for developers. Since your screens can now be viewed with an arbitrary aspect ratio, you’ll have to test your UI designs more thoroughly. You can use either virtual or physical devices for this, but it’s important to include larger screens such as tablets in your testing plan.
- [Voiceover] Android N has many new features that will appeal to both Android users and software developers. This is of course an early preview and it's possible that some of these features won't make it into the final release. But here are a few of the new version's capabilities. Perhaps the most visible new feature for N users is native support for split screen view. I'm showing a Nexus 5X onto which I've loaded Android N and I'm projecting the phone's screen to my computer using casting and reflector two.
Now I'm going to open up Chrome, let's say then that I wanted to switch to Maps. In the past I would exit that application and then I would go to Maps, but let's say now that I want to look at both apps at the same time. One simple way to do that is to go to the recent apps list and then touch and hold on the app you want to display and then drag it up to the top of the screen, then touch it again in the recent apps list, and now you're looking at both Maps and Chrome at the same time.
There's a separator icon you can drag up and down as you like. And then when you're done with the split view you can get rid of it by just dragging the separator icon all the way in either direction. This feature will probably be most interesting to tablet users, who typically would use it in landscape mode. And the process is pretty much the same. Go to your recent apps list, touch and hold, and then drag to the left, then touch on that recent app screen again, and once again you see a very useful split view.
If you change your orientation while you're in split view it changes elegantly. There's one other way to get into the split view mode, but you have to use an experimental tool. I'll drag down from the top of the screen and then touch and hold the gear icon until it spins, when I release it I'm taken to the settings screen and I see a message saying that something called the System UI Tuner has been added. I'll find it down at the bottom of my settings list.
I'll then touch System UI Tuner, I'll read the warning saying that this is experimental, and I'll touch got it to dismiss the dialog, then I will touch other, and then I'll turn on this feature enable split screen swipe-up gesture. Then I'll return back to my home screen, I'll once again open one of those apps, then I will touch and swipe up on the recent apps list button. And I immediately go into split screen view. I can then look for the app I want to display, select it, and once again I'm in split screen.
And then I'll get rid of split screen by dragging the separator all the way down to the bottom. Android N also made some changes to the quick settings screen. You can edit this screen to add your own favorite shortcuts, but also there are now multiple screens. And there are also changes to the notification system. They're grouped differently, but you can also manage apps right from this screen instead of having to go to the settings area. If I touch and hold on one of these notifications I immediately see this option that let's me block notifications for this particular application.
I'll select that option and the notification goes away. There are other new features available for users. In addition to the changes to notifications, there are also changes to how battery life is extended through the Doze mechanism. There are other new features in the recent apps screen, and you'll find that there's no more waiting while apps are optimized, or recompiled each time Android is updated. That recompilation process is now delayed until you open each app.
It still has to be done, but it's no longer done all at the same time, delaying your upgrades. For developers the most important single change is the move from Google's own implementation of Java to OpenJDK. This adds all sorts of new features that you can use in your programming. To support many of these features there's a new compiler toolchain. These are called Jack and Jill. You can learn about the Jack and Jill toolchain on this page at tech-docs/jackandjill on the tools.android.com website.
There's a useful diagram on this page that describes the process of moving from your Java and class files to the dex files that are vital for running an app on an Android device. You'll also find information about how to configure the Jack compiler in your Gradle scripts and also this compiler now replaces the Proguard tool that's used for shrinking and obfuscating your packages before you deploy them to users. You'll find some basic information about how to use this and as I'll describe later, this requires certain changes to your Gradle scripts.
Because we're now in the OpenJDK libraries Android now supports a certain amount of Java 8 syntax, including lambda expressions and defaults methods in the interfaces. Some Java 8 APIs have also been implemented. For example, you can now create functional interfaces, but that doesn't mean you can use everything in Java 8. For example, the Java.time API is not currently available and we haven't had any indications yet as to whether it will be upon final release.
There are changes to some existing APIs though, including those for notifications, messaging, direct boot process, directory access, and more.