In Google’s IO17 Developer’s conference, Google came up with Android O, which is the codename for Android’s forthcoming new operating system. They introduced some excellent new features that allow developers to develop apps with more richer user experience.
Google is going to come with four version of developer previews from which three of them are already released.
Developer preview with Alpha quality on March 21, 2017.
Developer preview with Beta quality on May 17, 2017.
Developer preview that finalizes API on June 8, 2017.
Fourth Developer preview is scheduled to release by third quarter of this year.
Now Let’s check out the new features:
Picture in Picture mode : Developers can now add pip mode in their apps which allow users to explore other contents of same app or some other apps while watching video on apps like Youtube, Netflix, etc. If user click the pip mode, then their current activity can be seen in foreground in a small screen, while all other browsing activities remains in background.
Color Management : It now supports wide color gamut display, thus developers developing imaging app can take advantage of providing more beautiful colors in the WCG display supported devices. It supports 16 bit PNG files and ICC color profiles such as AdobeRGB, DCI-P3, Pro Photo RGB, etc which are when embedded in JPEG, PNG or WebP, provide correct color rendition across multiple screen.
Multiple display : Android O supports improved multiple display feature that is Multi window = Multi display. This means, the multi window supported app automatically supports multiple display. Also, if any application compatible with multi window mode is running on multiple device, then user can shift application from one display to another and app automatically resizes itself to fit to the different display. Developers too can control the display they want to use to run the application by using Activity option. Google also came up with two configuration testing tools such as Adb shell and Dumpsys display.
Media : Android comprises of many categories in Media such as media player, media extractor, media recorder and media codec and they came with new API known as getMetrics() for all categories. It is helpful in querying configuration and performance related information regarding particular media. You just need to call getMetrics() for media player for example, then you will get PersistableBundle having all data.
Media player :
Playback has been improved so much. Developers can now control the buffering in their application by specifying low and high watermarks in duration or size or both. Also provide refined control to seek frame and now it has DRM playback with Widevine.
Media recorder :
In previous versions, media mixer allow developers to add only one video or audio track, but in Android O, it allows to add as many video and audio they want and can also add custom tracks(metadata tracks). There will be no limit. Moreover, it now supports MPEG-2 TS stream format.
This new API allows safe browsing by detecting malware and unsecured web pages as in chrome. You just need to add EnableSafeBrowsing and the same backend and API will work as for Google Chrome. Moreover, they also introduced two new API that are Termination Handle to detect crashes and decide what to do with the application and Renderer importance API to deal with low memory problems.
Animator Set :
It’s API supports seeking and reverse function in which seeking allows to set the animation at specific point, whereas reverse allows same backward and forward action. No need to set up separately.
Fonts in XML:
Google has introduced new resource font directory in which developers can directly add their font files or font family. Thus, developers get full flexibility of using their own fonts in their applications. Also, it allows developers to declare font that are not available in the system but want to use, then it can be downloaded and cached on the system. Moreover, soon font provider will be available which gives access to around 800 google fonts.
Autofill:With the new Autofill framework, user will no longer have to fill their details over and over. They just need to select autofill option and their details will be filled by the system.
AutoSizing Textview: This API allows size of the text to automatically adjust to the size of the textview. Moreover, font size can also be changed by specifying its size or by snapping at particular size when it resizes. Those API related to texts are available both in XML, Java programming language and support library.
Accessibility Service utilities: These features increase the scope of developing more accessible apps. It includes language detection, ability to add buttons in the navigation bar along with other buttons to give more accessibility, separate volume control that allows adjusting volume of the audio independent of other sound of the device and fingerprint gestures.
Adaptive icons: It is the advanced technology that allows developers to use different shape app icons. It allows icons to adjust itself to set in any kind of shape through adaptive launcher.
Notification: Android O has new API for managing the notifications from user’s and developer’s perspective. It is known as Notification channel in which developers has to group their notification in to different channels or categories. And user’s can see their channels, adjust channel behavior, block channel or whole app. Now it has become mandatory to use channel for every notification otherwise it will get dropped.There are many other features are introduced like notification snoozing, quick setting redesign, notification shade stability, launcher icon badge, improved ambient display, media notification, performance enhancements, new animations, battery percentage, minor text fixes.
Strict mode detectors: Google came with three detectors that are Unbuffered IO, Untagged Sockets, Content URI without permission to find bug in the apps. It makes debugging process very easy.
Media file access: It allows developers to create seekable file descriptor from custom document provider, which provides apps an access to all files in a data source using Storage Access Framework. It is useful for audio, video and other large amount of content.
Cached data: This is the new API that allows you to stay below the quota of data that can be cached. As every App is now allocated with certain amount of cached data, it starts deleting cached data if the system runs out of storage memory. So, by staying below your quota, aggressive deletion can be avoided. It is done by going to store manager, where you can query number of byte allocated to your app. Moreover, you can also use SetCacheBehaviorTombstone which tells about which files are never cached and which are cached and deleted. It will truncate the file with size zero with empty file kept intact on the system.
Security: Lot of changes are made with respect to the security. Android_ID should be different for every app and for every user on the device. So, now users can’t be tracked between two apps on the same device. Also Webview contains safe browsing API, which protects from unsecured web pages. Moreover, Google Play Protect has also been introduced, which if enabled on any device, it is protected. It will screen any app that is uploaded to Google Play and will be screened repeatedly for every new version. Improvements are also made in features such as encryption and verified boot, media stack hardening, instant app security, kernel hardening and authentication.
Kotlin: It now supports more modern and sophisticated programming language Kotlin. It is already available in Android studio 3.0.
Java programming language updates: Google has included more API such as Java.time for easy manipulation of date, time, instants and duration., Java.nio.file for accessing the attributes of file and Java.lang.invoke.
Also introduced changes in runtime by including New Concurrent copying collector, which means no pause time and makes much faster and Heap compaction in foreground, which helps to compact heap in foreground, faster allocation and collection. Such optimizations results in efficient use of memory and improved performance.