What’s new in Android 8.0 dubbed as Android Oreo?
Google INC is known for launching new versions of Android operating systems each year. But, this year, the newly launched Android 8.0 or android Oreo is something special. Not only it is push with rich and intuitive features but also for its next-gen user-friendly and attractive skins.
Google has beefed up Android Oreo with latest features available in flagship phones, making it smarter, faster and powerful OS till date. Also, to mention that though it has included all these features, the speed and agility of the Android OS has increased with boot times and load times of Apps decreasing by 40-50% in some devices. It is safe to conclude that it will make Mobile App Development far more exciting.
Picture-in-Picture mode is already available for Android TV, but now Android 8.0 makes this feature available on other Android devices. PIP mode lets user manage two applications simultaneously on any size screen, it’s like having super strength and laser vision.
Set android:supportsPictureInPicture to true in the manifest to specify that your activity can use PIP mode.
Notification behavior and settings are now easier to manage with redesigned notifications in Android 8.0. These changes include:
- Notification channels
Notification channels allow you to create a user customizable channel for each type of notification you want to display.
- Notification dots
Android 8.0 introduced Notification dots which reflects the number of new notifications that the user has not yet acted on or dismissed. Press the notification dots to quickly see what’s new, and easily clear them by swiping away.
User can snooze the notifications to make them disappear for some period of time. Apps can remove or update a snoozed notification,┬ábut updating a snoozed notification does not cause it to reappear.
- Notification timeouts
User can set timeout to cancel a notification. Using setTimeoutAfter() method user can specify duration after which a notification should be canceled.
- Notification settings
User 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.
- Notification dismissal
Notifications can be dismissed by the user themselves or apps can remove them programmatically. onNotificationRemoved() method of class NotificationListenerService is used to determine when a notification is dismissed and why it’s dismissed.
- Background colors
You can customize 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.
- Messaging style
In Android 8.0, notifications that use the MessagingStyle class display more content in their collapsed form. You should use the MessagingStyle class for notifications that are messaging-related.
For most used apps on your devices, Android 8.0 make it easier to log into services quickly. It lets the operating system and apps with the autofill API to autofill forms and passwords. Apps using form data can optimize their apps for Autofill, and password manager apps can use the new APIs to make their services available to users in their favorite apps.
With Android Support Library 26 you can load fonts from a provider application instead of including them in your APK or letting the APK download fonts. The provider and support library manage the download of fonts and shares them across apps. This feature reduces your APK size, increases the app installation success rate, and allows multiple apps to share the same font. The same implementation also supports downloadable emoji, so you can get updated emoji without being limited to the emoji built into the device.
Fonts in XML
Fonts are now a fully supported resource type. You can now use fonts in XML layouts and define font families in XML. Fonts are compiled in file and are automatically available in the system as a resource and there is no need to bundle fonts as assets. You can then access these fonts with the help of a new resource type, font. The Support Library 26 provides full support to this feature on devices running API versions 14 and higher.
Autosizing Text View
Android 8.0 allows you to instruct a TextView to let the text size expand or contract automatically to fill its layout based on the TextView’s characteristics and boundaries. This means, it is much easier to optimize the text size on different screens or with dynamic content. You can create an array of preset text sizes, or set min and max sizes with a step granularity, and the text will grow and shrink to fill the available TextView space.
Android 8.0 introduces adaptive launcher icons, which can display a variety of shapes across different device models. Adaptive icons support visual effects, and can display a variety of shapes across different device models. he system also animates interactions with the icons, and uses them in the launcher, shortcuts, settings, sharing dialogs, and in the overview screen.
Background Execution Limits
Google has been optimizing Android more and more to limit the amount of battery drain and what apps can do while running in the background. For background service limitations in apps, Android Orio will allow any app that is placed in the background to create and use services for a number of minutes. After that time period has expired, the app will automatically shut down any background services.
Apps are restricted in two ways:
- Background Service Limitations
While an app is idle, there are limits to its use of background services. This does not apply to foreground services, which are more noticeable to the user.
- Broadcast Limitations
Apps cannot use their manifests to register for most implicit broadcasts. They can still register for these broadcasts at runtime, and they can use the manifest to register for explicit broadcasts targeted specifically at their app.
In most cases, JobScheduler helps to work around these limitations. JobScheduler helps to perform work when the app isn’t actively running, but still gives the system the leeway to schedule these jobs in a way that doesn’t affect the user experience. Android 8.0 offers several improvements to JobScheduler that make it easier to manage services and broadcast receivers with scheduled jobs
Background Location Restrictions
Android 8.0 limits the frequency of retrieving the user’s current location by background apps in order to reduce the power consumption. The system distinguishes between foreground and background apps. If an app has visible activity, a foreground service or another foreground app is connected to the app then the app is consider to be in the foreground. If none of those conditions is true, the app is considered to be in the background.
If an app is in the foreground on a device running Android 8.0 (API level 26), the location update behavior is the same as on Android 7.1.1 (API level 25) and lower.
If an app is in background then apps can receive location updates only a few times each hour.
If your app running in background requires frequent location updates then the app can retrieve it more frequently by performing one of the following actions:
- Bring your app to the foreground.
- Start a foreground service in your app by calling startForegroundService()
- Use elements of the Geofencing API, such as the GeofencingApi interface, which are optimized for minimizing power use.
- Use a passive location listener to receive faster location updates.
These are just some of the features that Android Oreo has on offer for smarter and faster Android Application Development. Android is now working on next year’s Android P to make useful for both user specific apps as well as Enterprise Mobility Solution apps to expand its operating system across more devices and users across the globe.