What's New in Android 8.0 Oreo

Android 8.0 (API level 26) version comes with new features and capabilities for users and developers which is very prevailing, smarter and faster in comparison with older versions.
Some of the new and exciting features of Android 8.0 are as follows;

Picture-in-Picture Mode

Autofill Framework

Notification Dots

New Emojis and others

Android Oreo starts tasks faster with 2X boot speed during powering up. It also has background limits to minimize the apps.
This article speaks about three main features o, i.e., Picture-in-Picture mode, Autofill framework, Notification dots in detail.

Picture-in-Picture Mode

PIP is a newly added feature which has a lot of benefits. Some the benefits are listed below

It avails multi-window support which means the user can see two apps at once.

It is mostly used for video playback, i.e. user can simultaneously use an application and watch the video. When the activity is in PIP mode, it hides the UI elements, and video playback is continued.

The PIP window can be dragged wherever required and it adjusts accordingly on the screen

To get the PIP support into action, it has to be registered in the manifest file by setting android:supportsPictureInPicture and android:resizeableActivity to true also have to handle the layout configuration changes.

Methods:

enterPictureInPictureMode(): This method is called when user enter into PIP mode. An activity must call this method to enter into PIP mode.onPictureInPictureModeChanged(): This is an override method it is called when user enters or exits Picture-in-Picture mode.

Notification Dots

Notification Dots also known as Notification Badges. It is one of the unique features in Android 8.0 (API level 26). It displays dots on app icons on the launcher screen. Notification dots displays notifications which are associated with one or more notification channels in an app.

Instruction to use the Notification Badge:

By long press, on app icons, the user can see the notifications associated with it and then take necessary actions accordingly, like swipe away to dismiss it. The user can adjust the Notification Badges i.e. turn off or on the badge from settings

Methods:

setShowBadge(): This method is used to set the presence of Notification Badges. By setting it to true means the notifications from a channel being reflected by the badge and false means it stops the presence of notifications by the badge.setNumber(): This method is used to show the count of notifications which is display on app icon by long press in launcher screen.

AutoFill Framework

It is one of the defining features of Android 8.0. This framework manages the communication between the app and autofill service. The user can save their time while filling forms like a credit card, account, etc. by using autofill in their devices.
Autofill framework has many benefits like :

Saving users time from re-typing information,

Removing errors while typing information on mobile devices.

Autofill feature can be enabled or disabled from settings. Upon user’s permission autofill saves or remembers the logins which increase the speed of app accessibility.
Let’s see how we can do it with the help of an example.

Example of code

Here, we will create an application which implements all the above features, i.e., Picture-in-Picture mode, Autofill framework and Notification Channels.

Create an application AndroidOreoUpdateExample in Android Studio with updated version and API level 26.

Add the dependencies in build.gradle

Register the video activity in manifest file and services for Autofill as I discussed above.

Create the NotificationActivity.java class in your project and set the controls for sending test notifications.NotificationHelper.java:
Create this helper class in your project which extends ContextWrapper. Here, we will manage notification channels and create notifications also we can set notification dots method as I discussed above.

Create all the Multi dataset services in your project which are necessary for Autofill framework.

Output:

Home Screen

PIP Screen

Enter into PIP mode

PIP Mode

Notification Dots

Long Press on App icon

Notification Channels

Various Autofill forms

Autofill

Conclusion:

Thus, we understood the application of the newly added features of Android Oreo which target API level 26. These features consume lesser time to deliver better performance with high speed. The features of PIP mode allows the user to use two apps at once. Autofill save time and fewer errors, Notification dots display the notifications on long press and take actions there either to see it or not by swipe away. Thus Android Oreo comes with some new and useful features like additional and fun emoji’s, 2X speed while booting up, etc. Henceforth it can be concluded that the newly added features are interactive and important in Android development.