Since Google I/O in May there has been a firehose of information about the new things Google is providing, and the updates that have come out since. Now that the whirlwind has slowed down, it feels like a great time to catch up on what’s new and what updates have come out since the event. There have been several articles about the event such as Google I/O: What’s New in Android, and here the focus will be on the entire developer community.
This year’s Google I/O brought many new introductions to the Android and web development worlds. Additionally, Google Assistant and AI gained some traction as well. Finally, the team showed a large focus on security, productivity, tooling stability and accessibility. It’s been a few months since those announcements came out, and there is surely some progress visible, so let’s dive in! :]
Behold: Android Q
With the upcoming release of Android Q, there have been many changes to the system and its behavior. Some of the key points this version is focusing on are user privacy and security. There are also a couple of smaller things developers and users should be aware of regarding these changes.
In Android Q, apps and their data will live in something called Scoped Storage. This type of storage represents a sandbox of sorts. Each app can only access its own app data directory, making the navigation through and to data much easier. As such, most apps won’t require any permissions, such as
READ_EXTERNAL_STORAGE, to manage the app data. Furthermore, this works for data you want to save in external storage. But if you still want to read files and data from other apps, for example when using file-manager applications, you need these permissions.
Additionally, if your app wants to access downloads, it can simply use the system’s Storage Access Framework, once again, without any permissions! The documentation states that as of Android Q Beta 6 you can either work with the new filtered storage or opt-out of it. If you opt-out, you’ll have to use legacy storage by adding the following attribute and code to the Android Manifest:
<manifest ... > <!-- This attribute is "false" by default on apps targeting Android Q. --> <application android:requestLegacyExternalStorage="true" ... > ... </application> </manifest>
If you choose to do so your app will use the legacy storage system even if the device updates to Android Q. You should definitely still check out and prepare for scoped storage by following the official documentation. Future releases will enforce scoped storage and require it by default!
Another really important change regarding security and privacy is the location permission change. Frankly, not much has changed here regarding development. But, if you’re rolling the latest Android Q previews you might’ve noticed how the system dialog changed! Now, the system periodically tells you that an app has been using your location in the background:
With this in mind, developers should be very transparent when it comes to using location. The user will get notifications from the system mentioning apps that have background location access. Since they can disable access to it at any time, it’s easy to lose the location permission from the user. So, unless you really need the user’s location data when the app is in the background, you should be careful when requesting it! :]
Another major concern the Google team has had for the past year or so is the question of developer productivity. Most importantly, Android has become increasingly Kotlin first. All the new Jetpack libraries reflect this, as they received first-class Kotlin support! However, you’re still writing Kotlin in another tool, Android Studio! As such, it’s also crucial to mention that Android Studio has received many new improvements, bug fixes, and optimizations. Let’s see what changed in the past few months on that front.
A great initiative by both JetBrains and Google called Kotlin/Everywhere has been one of the main focal points for both companies. The companies are striving to further improve Kotlin and Android developer communities. With that in mind, they came up with the idea of creating global community-driven events all about this amazing language and its users. In the past few months, you had the opportunity to apply as a speaker at one of the Kotlin/Everywhere events, or even to be an organizer of an event in your local community.
This has lead to several hundred events being organized with support from both Google and JetBrains. The companies support you with speakers, goodies and general organization. There’s still time to organize your own event at the official event website. This just goes to show how important Kotlin is to not only Google and the Android developer community, but also server-side, web and native development communities! :]
Supporting and using Kotlin is great, but many projects require a different kind of development. These projects require native development with C++ or have a dependency on legacy Java code. Because of that, it’s important to know that those programming languages still get a lot of love and support. Google has continued improving the support for modern Java 10 desugaring and language features and C++ 17. You can use modern features to optimize and make your code more concise, while still keeping the ability to analyze the code thoroughly.
Additionally, they are constantly updating and simplifying native development documentation to make it easier for you to use the NDK!
Not long ago, Google announced Android Jetpack. This is a series of libraries to write less code, support larger audiences, and provide more stable and backward-compatible solutions. It sounded a bit too good to be true, but Google has done nothing but deliver when it comes to Jetpack. Jetpack is constantly growing and involving more and more libraries you can use in your everyday code. This results in you having a much simpler job when it comes to working with many Android features.
One of the newer components, announced at Google I/O, is the CameraX library. It’s meant to be a simpler, cleaner, and more extensible solution for working with the Camera API on Android. Additionally, it should work across all device vendors with consistent behavior. At Google I/O you couldn’t see a lot of code around it or try to implement it in your project. Part of the reason was that the API was pretty new and in alpha stages. But now, a few months later, you can follow this cool Codelab from Google, which introduces you to the CameraX API. If you follow the Codelab you can easily integrate CameraX in your project!
This is one of those things which everyone is still waiting to learn more about, but nothing happens. Even if a few months have passed. Sadly enough, this new and cool reactive and declarative UI framework didn’t bring much more to the table. It’s still in very early pre-alpha stages and there aren’t many examples which you can follow to learn more about it. There aren’t even many tutorials or articles out there, because people still haven’t built a larger example using it. However, if anything new emerges, we’ll be the first to let you know! In the meantime, you can check out our Jetpack Compose Primer. :]
Android Studio Improvements
Five years ago, Android Studio first came out. Remember the old days of working with Eclipse? If you do, it probably gives you the chills. Thankfully, the mighty Android Studio is here now, to save the day and developer time! However, over the years you may have seen its ups and downs. With new features, and new bugs and leaks, it kept riding a painful rollercoaster. It quickly went from being the most amazing tool ever, to being too unstable to work with at times. Because of this, the tooling team stopped working on new features for more than six months! They instead focused their efforts into fixing a ton of Android Studio bugs and leaks. By doing so, they removed several hundred bugs and leaks from the IDE, drastically improving it.
Currently, Android Studio 3.5, which features these fixes, is now available! You can see a new, much faster and stable release for yourself! Not only that, but Android Studio 3.6 is in Canary 7 version, showing that the team is constantly improving the tools we use every day.
Another cool user-experience feature is the ability to force or suggest application updates from within the app itself. Through the use of the In-App Updates feature of Android, you can add custom logic for when your app needs an update. Moreover, you can also say which versions are crucial to download. Using this, you can stop the user from proceeding unless they update the app to the target version. You can check this feature and its implementation by following the official documentation.
Given the rapid growth of AI development and the number of virtual assistants available out there, it’s only natural that Google introduced something for the Assistant as well! There are three major improvements in the Assistant field – the HowTo templates, improved App Actions, and the Interactive Canvas. You can read more about these in detail by reading Google I/O Reactions: What is New with the Google Assistant.
Google’s amazing Assistant is becoming increasingly useful and smart. For years, it’s been helping you do things with just your voice in a drastically shorter amount of time. Amongst other things, people have used the Assistant to find good “How to”, or DIY tutorials. However, one of the problems when searching for such tutorials is the layout for the website. It can happen that the website, or the search result, is not formatted cleanly and intuitively. A good example of intuitive and user-friendly design is the DIY Networks website. All of the tutorials on it are formatted in a clean way. If you find a tutorial on their website, using the Assistant, you’ll easily be able to follow it no matter what device you’re on.
But you don’t just read tutorials on a topic, you also watch videos. This is why the Google Assistant team has prepared a special HowTo template, so you can translate video tutorials to website and Assistant-friendly content.
Improved App Actions
Back when Google first announced App Actions, it wasn’t easy to connect an Action to your app and for the Assistant to recognize which type of action you’re requesting. Because of this, the team added the four most common category types to App Actions. This will help you differentiate Actions and help the Assistant with recognizing which type of Action it’s running. These categories are:
- Health & Fitness
- Food Ordering
Using these categories, you can separate each part of your app to a different action.
Improving the Web
Google has a strong focus on web technologies, amongst other things. From the very start, they’ve been a great part of the Internet, and over time they’ve consolidated their role as a leader in the area. Which is why Google I/O couldn’t have happened without a few announcements in this section!
Speeding up Web Browsing
Google’s constantly trying to speed up web browsing with newer versions of Chrome. Since Google I/O they have introduced several things to speed up everyday web development, and web usage. One of the few things are the new Chrome and Chromium OS versions which improve website loading by a large amount, especially on low-end devices. As a small cherry on top, they’ve introduced a special flag to image HTML elements which loads images lazily for you without any extra work. You can use this by adding a flag, like so:
<img src="source.png" alt="Lazy loading rules!" loading="lazy"/>
That’s like a free piece of optimization you can add to your websites right away!
Safe and Private Browsing
On top of everything, the web team has focused on improving the user’s privacy and safety when browsing the Internet. After great strides to move as much content to HTTPS, it’s time to integrate other features for safe browsing. They’re currently focusing on private cookies by default, transparent privacy settings and anti-fingerprinting mechanisms. All these features should ease the way you browse the web while keeping your data safe.
Platforms for Developers
With all the talk about web being more secure, faster, and gaining many great features, it’s important to note that it may be hard to keep up with all the best practices. This is why you can now join the web development learning platform, which Google curated just for this reason. They want to make many tutorials on building fast, performant and scalable websites. They also want to promote best practices so you don’t hack away at things for them to work.
On top of that, they are promoting the ChromeOS platform, as a developer-first platform. Due to many key software features, such as port-forwarding, supporting Linux out of the box, and many IDEs, ChromeOS is a really good platform for developers of all platforms and codebases!
Machine Learning & Artificial Intelligence
It wouldn’t be Google if there wasn’t some talk on ML & AI. As always, Google has managed to speed up their frameworks like TensorFlow, MLKit, and GoogleCloud. This will help you train more models faster, and train many different things like image and text recognition. Additionally, they showcased an app that manages to run and analyze five complex data streams simultaneously without performance issues. This is mostly possible because of TensorFlow’s improvements, and TensorFlow Lite running on-device ML.
They’re also open-sourcing the TensorFlow 2.0 framework, and the new, third, version of the Cloud TPU Pods for machine learning is in beta.
And last, but not least, the team at Firebase is always bringing new features to the platform. The platform itself has grown tremendously in the past couple of years. But more importantly, it is integrating more and more into the rest of the Google frameworks. As such, you can easily connect ML Kit to Firebase apps within a few simple steps. To do so, follow the official documentation for Firebase ML Kit.
Other than that, the Firebase team brought the Performance Monitor feature, to web apps as well! You can now analyze the performance and reach of your apps and constantly work on improving it using the Monitor.
Where To Go From Here
Many amazing new things have been announced at the Google I/O, and you can definitely see a lot of progress for some of them. We can only guess at what more the rest of the year will bring to us. We’re still waiting for the Android Q release, new Pixel phones, and many APIs to become more stable and visible, such as Jetpack Compose.
To catch up on some of the other new things Google is delivering, you can check out these articles:
- Google I/O 2019: Opening Keynote Key Topics and Reactions
- Google I/O: What’s New in Android
- Google I/O Reactions: What is New with the Google Assistant
- Google I/O 2019 First Impressions Livecast
What are you most excited about? Hopefully, you had a fun time recapping the announcements. Do join the comment section below, and add anything you feel like this article missed out on! :]