On August 22nd 2016 Google has released a new version of their most popular mobile operating system – Android 7.0, called Nougat. This release has introduced a bunch of features that have been awaited by the users and developers and will significantly improve the user experience and increase performance while running the apps. Let’s have a look at what Google has prepared for us this time.
This article is an introduction to the whole series, that will cover the use cases and theory described here in a practical way.
Did you see the UI changes?
Most awaited feature: multi-pane screen!
How many times did you try to focus on multitasking when using your mobile, but you just lacked the possibility of displaying two applications at one moment on the screen? It shouldn’t be a problem for you at all, as now for your convenience you can simply keep 2 activities next to each other (who doesn’t like to watch YouTube when digging through emails, huh?). For AndroidTV this means a possibility to use the PIP (Picture In Picture) feature respectively. Moreover, when running the apps in such mode, the user can be able to drag and drop data between the applications on one screen! How to make it possible in your own app, it will be described in one of the next articles.
Starting with Android 7.0, the notification mechanism has also improved a bit – now they are more interactive than before. This means, besides the possibility to access action buttons within them, you are now able to add the feature of direct reply within your messaging apps, or use custom views.
The visual side of the notifications has also changed – the operating system is now able to group the notification according to the rule set (e.g. by conversation topic, recipients, etc.). This works very similar to the Android Wear notification system, so you may be already familiar with implementing this concept.
Get familiar with behavioural innovations
Android Nougat is not only a small evolution within UI, but also has some improvements hidden within system implementation. It’s all about memory optimization, battery consumption, data transfer minimization as well as security enhancements. Let’s have a quick look over these changes.
Permission mechanism development
Similarly to the permission restrictions that have been added in previous Android releases, Nougat brings some more of them. This time they are related to file access, especially the ones that are belonging to an app – they have now restricted access with 0700 permissions (this happens when you target your application against API level 24 or higher). This will prevent the app from leaking private data or metadata.
Introduced in Marshmallow, Doze helps to prevent your device’s battery from draining. This means the OS is optimizing the CPU and network usage once device has been locked and left with the charger unplugged, and staying stationary. In Nougat a significant improvement has been made: Android is now able to recognize whether you are using your device when you are on the move (when e.g. your mobile is in your bag and keeps moving). Android disables Doze as soon as you unlock the screen or connect the charger. Sounds cool, right? Make sure your app is still following the Doze recommendations described here – then your app should not use too much battery power.
If you ever tried to cut off from your work after leaving the office while having your company’s inbox configured on your phone, at some point you must have noticed, that it’s almost impossible. One of the options is to deal with two different devices, one of which would need to be turned off right after your shift ends. Then, finally, you can enjoy your private life. What an idyll… Sounds like a dream?
Not anymore! Discover Android for Work, that lets you keep your private and company lives separated. In Android Nougat you are able to define the boundaries when the Work Profile can be disabled – this means the user won’t receive any corporate emails or notifications at home.
So far Android has offered the possibility of changing the font size, in case it has been inconvenient for the user to read. Anyway, the font size is not the only thing that actually has influence on the screen readability. What is also important is to have the proper screen size setting. Android Nougat introduces the possibility to choose the screen size (density) for the user, what improves accessibility. To compare how it looks like using Nexus 5x, please see the following screenshots:
Your application should also be able to respond to the change of this setting gracefully. Make sure that you support this feature.
Here are some other improvements:
Worried about your data plan when using your mobile online? Starting with Android 7.0 the OS can provide the information upon the connection type to the applications, so that they can decide how much cellular data they should use.
Tired of receiving calls or texts from particular numbers? Now you have the possibility to choose what numbers should be black-listed and ignored when using the mobile. This feature is integrated with the OS and available to the user at any time. From the app developer’s perspective, you can access this list only when you are creating an SMS messaging or dialer app and, if and only if, your app is the default one to handle these communication channels. The list is synchronized and may be used across several devices.
Wanna hide information upon incoming calls (for whatever reasons)? Then you can use the Call Screening service that allows the phone app to decide whether the call should be hidden in the call logs, ignored, rejected or disallowed.
And many, many more…
It’s good to know the following API innovations
The newest features of Java 8 had been awaited for a long time before they came available for Android developers. Starting with Nougat, some of them are now officially supported:
- Repeatable annotations
- Default and static interface methods
Unfortunately, only the following ones may be used with previous Android (API level 23 and lower) releases:
- Method references
- Type annotations
All of these are available thanks to Jack (Java Android Compiler Kit) that has been introduced along with Android N SDK. In order to enable it, you simply need to set some simple Gradle properties like source and target compatibility to Java 1.8 and let Jack do the job. If you decide to target Android SDK level 24, you will be able to use all the newest features. In order to leverage only the last 3 items from the list, but be able to run them on some older Android versions, you will need to target your app lower.
Quick Settings Tile API
Since several Android releases, the notification screen has started to be a kind of an action center, where you can control not only your current notifications, but also the quick settings for enabling and disabling your mobile components like WiFi, cellular data and so on. Now you will be able to add your own piece to this screen: feel free to create your own switch to control the behaviour of your app without the need of starting it from launcher.
A new 3D rendering API has been integrated within the newest Android release, called Vulkan. This is similar to OpenGL ES in terms of being an open standard for rendering and 3D graphics. The purpose of this is to give to developers more power to control the way of processing graphics, meaning controlling GPU more directly and relieve the CPU. So far, it is possible only with the devices that use specific Vulkan-compatible hardware, such as Nexus 6P, Nexus 5X and Nexus Player. More of them are to come!
…and that’s still not everything. It’s impossible to cover all the news in one entry.
Android N easter egg
There is no Android fun without finding the easter egg related to each release! Now the bad news: those, who have tried the “Flappy Droid” game (solo or multiplayer) may be a bit disappointed this time. Nope, sadly, there is no new version of this game… but there are cats!
Gotta catch’em all! You can try to bait a hook (or better: a plate) and… wait for the kitty to come. It’s maybe not as much exciting as playing against other mates the flappy game, but definitely it’s something that has never been (expected?) there.
All in all, Android Nougat and all its features need to be discovered. How to go through all of them? I suggest you to wait for the tutorials that we will post on this blog. Stay tuned!