What Is New in Android 8.1
Android 8.1 Oreo is an incremental update focused on refining the user and developer experience introduced in 8.0. It brings new APIs for hardware, optimizations for low-RAM devices, and several developer-quality-of-life improvements.
| Category | Key Changes |
|---|---|
| New Features | Neural Networks API, Autofill enhancements, Shared memory API |
| Improvements | Android Go memory optimizations, Notifications, WebView security |
| Behavior Changes | Background execution limits, Cache data handling |
| Deprecations | General progress on deprecating outdated methods |
What hardware acceleration does the Neural Networks API enable?
The Neural Networks API (NNAPI) provides a foundational layer for on-device machine learning operations. It allows frameworks like TensorFlow Lite to leverage dedicated hardware accelerators, such as DSPs and NPUs, for faster and more efficient inference. This is a big deal for running ML models for image recognition, translation, and other tasks directly on the device without a network connection. In practice, it means your ML-powered apps can be more responsive and power-efficient.
How did Android 8.1 improve the Autofill framework?
Android 8.1 added several key APIs to give Autofill service developers more control and context. The getAutofillOptions() method allows you to provide custom suggestions for fields like credit card expiration dates. Services can also use the isVisibleToUser() view property to better determine which views are eligible for autofill, making the service smarter and more reliable. These changes matter because they directly impact the user's perception of how well your password manager or autofill service works.
What are the memory optimizations for Android Go?
Android 8.1 introduced specific features to ensure a great experience on entry-level devices with 1GB of RAM or less. The OS now actively manages memory usage more aggressively for these devices, helping apps stay in memory longer. There's also a new android:managedSpace attribute in the manifest that lets you specify the amount of managed space your app needs. This entire effort was crucial for bringing a performant Android experience to the next billion users.
How does the SharedMemory API help with performance?
The new SharedMemory API allows you to create, map, and manage an anonymous shared memory region. This lets multiple processes or apps efficiently share large amounts of data without the overhead of copying it. You can set protection on the memory (e.g., read-only) and even parcel the file descriptor to another process. For performance-critical apps, this is a lower-level tool for efficient inter-process communication (IPC) compared to traditional Binder transactions.
What changes were made to notifications?
Android 8.1 gave users more granular control over notifications. Apps can now only set a notification's importance level once when the channel is first created; after that, the user has final say and can change it in system settings. The update also introduced a new visual effect: a slightly dimmer background when the notification shade is fully expanded. These are subtle but important changes that prioritize user preference over app requests.
FAQ
Is the Neural Networks API a replacement for ML frameworks like TensorFlow?
No. The NNAPI is a backend layer. Developers typically use higher-level frameworks (e.g., TensorFlow Lite, Caffe2) which then use the NNAPI to delegate computations to capable hardware drivers, if available.
Do I need to do anything for my app to work on Android Go devices?
While optimized to run, you should actively test your app on a low-RAM device or emulator profile. Pay special attention to your memory footprint and consider using the android:managedSpace attribute if your app caches large amounts of data.
Can I change my notification channel's importance after creating it?
No. In Android 8.1, the importance level can only be set programmatically when the channel is first created. Once created, only the user can change the importance level through system settings.
What is the practical use of the SharedMemory API?
It's for advanced use cases where you need to share large buffers (like bitmap data or sensor data) between processes with minimal latency and overhead, such as between a camera service and a image processing app.
Were there any WebView security updates?
Yes. Android 8.1 enabled the same WebView Safe Browsing protections that were available in Chrome. This allows your app's WebView to display a warning to users when they attempt to navigate to a known dangerous site.