New Android Runtime (ART)
The 4.4 release introduced a new, experimental Android runtime, ART. Under 4.4, ART was optional, and the default runtime remained Dalvik. With the L Developer Preview, ART is now the default runtime.Most Android apps should just work without change under ART. However, some techniques that work on Dalvik do not work on ART.
If your app implements notifications...
Notifications are drawn with dark text atop white (or very light) backgrounds to match the new material design widgets. Make sure that all your notifications look right with the new color scheme:
- Update or remove assets that involve color.
- The system automatically inverts action icons in notifications. Use
android.app.Notification. Builder.setColor()to set an accent color in a circle behind your
- The system ignores all non-alpha channels in action icons and the main notification icon. You should assume that these icons are alpha-only.
If your app uses RemoteControlClient...
Instead, your app can provide media playback control from the lockscreen through a notification. This gives your app more control over the presentation of media buttons, while providing a consistent experience for users across the lockscreen and unlocked device.
- Material design support
- Lockscreen notifications
- Notifications metadata
- Concurrent documents and activities in the Recents screen
- WebView updates
Multiple network connections
The L Developer Preview provides new multi-networking APIs. These let your app dynamically scan for available networks with specific capabilities, and establish a connection to them. This is useful when your app requires a specialized network, such as an SUPL, MMS, or carrier-billing network, or if you want to send data using a particular type of transport protocol.
Android 4.3 introduced platform support for Bluetooth Low Energy (BLE) in the central role. In the L Developer Preview, an Android device can now act as a Bluetooth LE peripheral device. Apps can use this capability to make their presence known to nearby devices. For instance, you can build apps that allow a device to function as a pedometer or health monitor and communicate its data with another BLE device.
android.bluetooth.le APIs enable your apps to broadcast advertisements, scan for responses, and form connections with nearby BLE devices. You must add the
android.permission.BLUETOOTH_ADMIN permission in your manifest in order for your app to use the new advertising and scanning features.
Developer tools for power measurement
The L Developer Preview provides several new developer tools and APIs to help you better measure and understand your app's power usage.
dumpsys batterystatscommand allows you to generate interesting statistical data about battery usage on a device, organized by unique user ID (UID). The statistics generated by the tool include:
- History of battery related events
- Global statistics for the device
- Approximated power use per UID and system component
- Per-app mobile ms per packet
- System UID aggregated statistics
- App UID aggregated statistics