News and information from Google I/O can be a firehose. All the info and session videos can be found at the I/O site, but here is my list of Android highlights that every Android dev should know.
Instant Apps will allow users to deeplink directly into your app from a webpage or another app, EVEN IF THE APP IS NOT INSTALLED. This is huge. Previously users were redirected to the Play Store to install the app, wait to install the app, and then open the app to finally see the content. Many users get lost during this process or just don’t want to install an app to their device. Instant Apps will allow a much smoother transition from web to native apps and will keep users engaged in their activity.
This works by breaking an app into modules that can be loaded separately rather than downloading the entire APK. The module is then run in memory. Apps will have to support Instant Apps and so far the details on how this magic works is sparse. More information will be available later this year.
ConstraintLayout is new layout in the support libs that works back to Gingerbread. It has been made to work together with Android Studio and a new layout editor. The new layout editor, available in Android Studio 2.2, is a WYSIWYG editor that allows you to drag and drop views and create “constraints” on layouts. It feels similar to relative layout, however the ConstraintLayout will make the view hierarchy flat and therefore more efficient than having nested layouts. The constraints allow more robust control when specifying a layout, so you won’t need to use LinearLayouts inside your RelativeLayout to get fine-grained positioning anymore. The ConstraintLayout may also be edited in XML. Check out Android Layouts: a new world and this doc to learn more.
Android N is bringing lots of new features with it. The developer preview release has been available for a couple months and now the developer preview 3 is available for Nexus devices. I’m not going to try to cover all the new features and APIs, but here’s a quick list of a few big ones:
- VR support
- Multi-window mode
- Drag and Drop across activities
- Notification updates - attribution, direct reply, bundled notifications
- Quick settings - editable & custom tiles
- Adjustable display size
- New doze mode
- Direct boot
- Java 8 features (lambdas!)
Firebase was everywhere at I/O this year with 12 sessions and mentioned in many others. For those not familiar, Firebase was acquired by Google about 1.5 years ago and has offered a realtime database, authentication, and static hosting. Now Firebase has been expanded to 15 products that complement each other. These are Analytics, Cloud Messaging, Realtime Database, Authentication, Storage, Hosting, Remote Config, Test Lab, Crash Reporting, Notifications, App Indexing, Dynamic Links, Invites, Adwords, & Admob. Google is really promoting this as making mobile apps easy and quicker to develop and has a new Firebase console for developers. If you want the big picture of what Firebase has become, the Firebase Overview session is a good one to watch.
One important change is Google Cloud Messaging is now Firebase Cloud Messaging. For those using GCMNetworkManager (should be everyone with minSdk < 21), it has now has an open source successor named FirebaseJobDispatcher. ##Espresso Test Recorder Also new in Android Studio 2.2 is the ability to record espresso tests from your device or emulator. Basically you start the espresso recorder and navigate through your app and espresso code is generated that will perform the same actions automatically. This looks like a great way to speed up writing automated UI tests. To see it in action checkout the What’s New in Android Development Tools session.
A whole new API was announced called the Awareness API which is “A unified sensing platform enabling applications to be aware of multiple aspects of a user’s context, while managing battery and memory health.” Essentially the Awareness API takes the existing device APIs and allows you to create simplified rules for when to get notifications about the user’s context. For example you may want your app to run a task when a user is riding in a car AND is near they favorite drugstore during business hours. There are 7 contexts supported by the Awareness API: time, location, place, activity, beacons, headphones, and weather. What is really nice about this api is your app does not need to be running to receive an Intent when the user has entered your required contexts. More information is available here and I/O Session here.
VR had a big presence at I/O as well with an announcement of DayDream. Daydream devices will be android devices that meet specifications set by Google. There were 19 sessions on VR including topics on design, cinema, monetizing, Cardboard, Project Tango, and VR in the classroom. Now Android has VR SDKs for Daydream and cardboard.
Android Auto had a presence at I/O with several demo cars setup with Android Auto (and an awesome concept of Android Auto integrated in a Maserati in the instrument panel). Also the Android Auto app will be able to run on phones. This will allow the same UI and functionality of Android Auto to be used by anyone with an Android phone. Biggest take away here for most developers is that number of users using Android Auto will be growing. There were two sessions on the Android auto including Future of Android Auto session which talks about bringing your app to Android Auto.
A few updates to the support libs were announced and there was a session covering What’s new in the support library. Important news announced was:
- Dropping support for below API 9 (Gingerbread)
- support lib v4 being broken up into multiple libs (compat, media, fragment, etc)
Expert’s Guide to Android Development Tools
Not really any news or announcements in this session, but this is PACKED with helpful tips and tricks to make our job easier and more efficient. Team members on the ADT team each give there top tips. Every android dev should check it out here.
Those are the highlights for Android from 2016 Google I/O! Hopefully you’ve found some good sessions to watch and learn the latest from Google.