Android 8.0(Android Oreo API level 26) released on August 21, 2017. Android 8.0 brings a ton of great features such as picture-in-picture, autofill, integrated Instant Apps, Google Play Protect, faster boot time, and much more.
Picture-in-Picture mode:
Android 8.0 (API level 26) allows activities to launch in picture-in-picture (PIP) mode. PIP is a special type of multi-window mode mostly used for video playback. PIP mode is already available for Android TV; Android 8.0 makes the feature available on other Android devices.
When an activity is in PIP mode, it is in the paused state, but should continue showing content. For this reason, you should make sure your app does not pause playback in its onPause() handler. Instead, you should pause video in onStop(), and resume playback in onStart(). For more information, see Multi-Window Lifecycle.
To specify that your activity can use PIP mode, setandroid:supportsPictureInPicture to true in the manifest. (Beginning with Android 8.0, you do not need to set android:resizeableActivity to true if you are supporting PIP mode, either on Android TV or on other Android devices; you only need to setandroid:resizeableActivity if your activity supports other multi-window modes.)
Android 8.0 (API level 26) introduces a new object, PictureInPictureParams, which you pass to PIP methods to specify how an activity should behave when it is in PIP mode. This object specifies properties such as the activity's preferred aspect ratio.
The existing PIP methods described in Adding Picture-in-picture can now be used on all Android devices, not just on Android TV. In addition, Android 8.0 provides the following methods to support PIP mode:
- Activity.enterPictureInPictureMode(PictureInPictureParams args): Places the activity in picture-in-picture mode. The activity's aspect ratio and other configuration settings are specified by args. If any fields in args are empty, the system uses the values set the last time you called Activity.setPictureInPictureParams(). The specified activity is placed in a corner of the screen; the rest of the screen is filled with the previous activity that was on screen. The activity entering PIP mode goes into the paused state, but remains started. If the user taps the PIP activity, the system shows a menu for the user to interact with; no touch events reach the activity while it is in the PIP state.
- Activity.setPictureInPictureParams(): Updates an activity's PIP configuration settings. If the activity is currently in PIP mode, the settings are updated; this is useful if activity's aspect ratio changes. If the activity is not in PIP mode, these configuration settings are used regardless of theenterPictureInPictureMode() method that you call.
Notifications
A notification long-press menu in Android 8.0 (API level 26).
Users can long-press on app launcher icons to view notifications in Android 8.0.
- Notification channels: Android 8.0 introduces notification channels that allow you to create a user-customizable channel for each type of notification you want to display. The user interface refers to notification channels as notification categories. To learn how to implement notification channels, see Managing notification channels.

- Notification dots: Android 8.0 introduces support for displaying dots, or badges, on app launcher icons. Notification dots reflect the presence of notifications that the user has not yet dismissed or acted on. To learn how to work with notification dots, seeNotification badges.
- Snoozing: Users can snooze notifications, which causes them to disappear for a period of time before reappearing. Notifications reappear with the same level of importance they first appeared with. Apps can remove or update a snoozed notification, but updating a snoozed notification does not cause it to reappear.
- Notification timeouts: You can set a timeout when creating a notification using setTimeoutAfter(). You can use this method to specify a duration after which a notification should be canceled. If required, you can cancel a notification before the specified timeout duration elapses.
- Notification settings: You can call setSettingsText() to set the text that appears when you create a link to your app's notification settings from a notification using the Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES intent. The system may provide the following extras with the intent to filter the settings your app must display to users: EXTRA_CHANNEL_ID, NOTIFICATION_TAG, and NOTIFICATION_ID.
- Notification dismissal: Users can dismiss notifications themselves, and apps can remove them programmatically. You can determine when a notification is dismissed and why it's dismissed by implementing the onNotificationRemoved() method from the NotificationListenerServiceclass.
- Background colors: You can set and enable a background color for a notification. You should only use this feature in notifications for ongoing tasks which are critical for a user to see at a glance. For example, you could set a background color for notifications related to driving directions, or a phone call in progress. You can also set the desired background color using setColor(). Doing so allows you to use setColorized() to enable the use of a background color for a notification.
- Messaging style: In Android 8.0, notifications that use the MessagingStyle class display more content in their collapsed form. You should use theMessagingStyle class for notifications that are messaging-related. You can also use the addHistoricMessage() method to provide context to a conversation by adding historic messages to messaging-related notifications.
Autofill framework
Android 8.0 (API level 26) makes filling out forms, such as login and credit card forms, easier with the introduction of the Autofill Framework. Existing and new apps work with Autofill Framework after the user opts in to autofill.
You can take some steps to optimize how your app works with the framework. For more information, see Autofill Framework Overview.
Downloadable fonts
Fonts in XML
The Support Library 26 provides full support to this feature on devices running API versions 14 and higher.
Autosizing TextView
Adaptive icons
Android 8.0 (API level 26) introduces adaptive launcher icons. Adaptive icons support visual effects, and can display a variety of shapes across different device models. To learn how to create adaptive icons, see the Adaptive Icons guide.
Color management
WebView APIs
- Version API
- Google SafeBrowsing API
- Termination Handle API
- Renderer Importance API
To learn more about how to use these APIs, see Managing WebViews.
The WebView class now includes a Safe Browsing API to enhance the security of web browsing. For more information, see Google Safe Browsing API.
Pinning shortcuts and widgets
For more information, see the Pinning Shortcuts and Widgets feature guide.
Maximum screen aspect ratio
First, Android 8.0 introduces the maxAspectRatio attribute, which you can use to set your app's maximum aspect ratio. In addition, in Android 8.0 and higher, an app's default maximum aspect ratio is the native aspect ratio of the device on which the app is running.
Multi-display support
Note: If an activity supports multi-window mode, Android 8.0 automatically enables multi-display support for that activity. You should test your app to make sure it works adequately in a multi-display environment.
Only one activity at a time can be in the resumed state, even if the app has multiple displays. The activity with focus is in the resumed state; all other visible activities are paused, but not stopped. For more information on the activity lifecycle when several activities are visible, see Multi-Window Lifecycle.
When a user moves an activity from one display to another, the system resizes the activity and issues runtime changes as necessary. Your activity can handle the configuration change itself, or it can allow the system to destroy the process containing your activity and recreate it with the new dimensions. For more information, see Handling Configuration Changes.
ActivityOptions provides two new methods to support multiple displays:
setLaunchDisplayId()
Specifies which display the activity should be shown on when it is launched.
getLaunchDisplayId()
Returns the activity's current launch display.
The adb shell is extended to support multiple displays. The shell start command can now be used to launch an activity, and to specify the activity's target display:
adb shell start <activity_name> --display <display_id>
Unified layout margins and padding
- layout_marginVertical, which defines layout_marginTop and layout_marginBottom at the same time.
- layout_marginHorizontal, which defines layout_marginLeft and layout_marginRight at the same time.
- paddingVertical, which defines paddingTop and paddingBottom at the same time.
- paddingHorizontal, which defines paddingLeft and paddingRight at the same time.
Pointer capture
Starting in Android 8.0, a View in your app can request pointer capture and define a listener to process captured pointer events. The mouse pointer is hidden while in this mode. The view can release pointer capture when it doesn't need the mouse information anymore. The system can also release pointer capture when the view loses focus, for example, when the user opens another app.