📜 ⬆️ ⬇️

What did Google I / O 2019 talk about: Android 10, AR apps and more

In this article I will tell you about my impressions of the Google I / O 2019 conference, which my colleagues and I visited the other day (and even “lit up” with our application in one of the presentations). It will help you feel the atmosphere and, perhaps, encourage you to watch several reports posted on the Google Developers channel .


Badoo Developers on Google I / O 2019

Day 0. Preface


To get to the conference, you need to win the lottery, which starts in February on Google I / O (usually it becomes known from the news). But the victory does not provide for obtaining a ticket, but only gives the opportunity to buy it for $ 1,150. There are other programs that allow you to get a ticket with a big discount or for free, for example, Code Jam . Students and employees of universities can buy a ticket much cheaper - for $ 375.
')
Before the conference, IT companies organized parties for the participants. I learned about them from the chat in Telegram, which brought together more than 150 Russian-speaking users. Typically, these chat rooms can be accessed by invitation from the specialized Android-communities in the Telegram. Such parties are a good opportunity to meet other conference participants in an informal setting. For example, we met there the organizer Mobius and the development team that makes the app for air travelers App in the Air.

The conference was held under the slogan "No parking". Google organized free buses from and to the most popular hotels in the area, and also provided promotional codes for Lyft (an American competitor to Uber) taxi service.

There were five developers from Badoo. Everyone who won the opportunity to buy a ticket went. Reports went in six-ten streams, and often we were divided to cover more interesting topics.

Day 1


The first day of the conference opens the so-called keynotes - general presentations. The first is for everyone, the second is for developers.


Before the keynote man-DJ and AI-DJ work together

Main news


At the first keynote presentation talked about different Google projects. Here are some news:


Android 10 will appear:


The presentation for developers announced that Kotlin is now the main programming language for Android development. Google introduced the new library for the Camera X camera, a new declarative UI Jetpack Compose (apparently, it is still quite raw, but very promising), new features for updating the application: the developer will be able to request the update on his own in the application interface.


During each report, subtitles are generated in real time.

Google Tips for Folding Devices


Recently only lazy people are not talking about folding devices. Although they now occupy a scanty market share, applications should work somehow for them.

Google representatives assured that if you follow the best practices, for example, properly handle the screen flipping, then everything will work out of the box. To support folding devices, the same mechanism is used as for multi-windowing on tablets and Chrome OS. In addition to the already existing android: maxAspectRatio, android: minAspectRatio will appear, designed to add restrictions on the ratios of supported parties in the application. Google says that 2 inches (5.08 cm) will be the minimum screen width of Android devices starting with Android Q.

A few things worth checking out if you are implementing support for folding devices in your application, while flexing and stretching a device:


If you do not want the Activity to change its size, then the android: resizeableActivity = false flag may not always help, since the system can still change the size of the Activity or put it in compatibility mode:



Compatibility Mode

It seems that now there are very few users with folding devices, but the cost of such gadgets is quite high and you definitely need to check how the application works on them.

On the pros and cons of multi-modularity


At the conference, much attention was paid to modularity. The main advantages of multi-modularity:


Multi-modularity also scales well for a large number of developers, which is a significant advantage for large and fast-growing teams.
Multi-modularity has problems. For example, it is not clear how to create a database. There are three approaches:


All approaches have their drawbacks, but the guys from Google promise a bright future with the Room, where they want to maintain the isolation of the modules and support cross-module queries, as well as modules with dynamic functions. Unfortunately, this is not yet available.

We have more than 170 modules in the Badoo application, we are not using the dynamic feature yet, but we get other advantages and disadvantages of multi-modularity.

Day 2


The second day of the conference was the most intense. The first report began at 8:30, and the last ended at 20:00. A total of 90 reports were submitted.


Such an audience is completely filled with people in about ten minutes.

New declarative UI


The Android system is already ten years old, the current UI is obsolete. Old UI is quite difficult to maintain. For example, the View class has 29,188 lines of code, including comments, the AppCompat version has acquired a lot of hacks for different versions of Android. Looking at this picture, the developers of Google decided to make a UI-framework, which will be supplied with the application and will be completely untied from Android. The working title of the framework is Jetpack Compose.

Flutter, React, Litho and Vue.js were sources of inspiration for developers, so the new framework will seem familiar to many. The basic idea is to ensure that the UI responds to changes in the model, while there is no logic in the UI.

View hierarchy is represented as functions annotated with @Composable annotation. The framework uses the Compiler Plugin to intercept calls to composable functions.
The Google team promises support for the new framework in the old hierarchies of the View (using the @GenerateView annotations), as well as a preview right in Android Studio and support for animations.
Jetpack Compose is still quite raw and not ready for use in real applications, but it’s worth exploring how it works now to understand where Android development is heading.

Designing Augmented Reality Applications


Google has prepared tips for designing AR applications.


More information on how to design AR elements in the app can be found in the video from the conference .

Best practices for using text in the development of Android applications


This report describes the best practices for working with text and some changes in the new version of Android.


And one more small news. In the report GIFs and More: Integrating Expression Search in Your App, Google presented its API for working with GIF - Tenor , an alternative to the well-known Giphy. We were one of the first to use it in our Badoo application, so we got on the slide to the speaker - as an example of use. Trifle, but nice!


Our application “lit up” in the presentation of Tenor

Concert


At the end of the second day, Google organized a concert at which The Flaming Lips performed. To be honest, before I had not heard about it, but, apparently, in the US it is quite popular. A small fragment of the performance is available on the Internet.


Before the concert

Day 3


The third day was short. Already by 4:30 pm all the reports were submitted, and with the end of the reports the conference ended. Basically, I talked with other participants that day, but I’ll tell you about a couple of reports that you should pay attention to.


There are areas for communication at the conference where it is not recommended to use equipment.

Principles of Animation


In his report, Nik Butcher talked about how to implement animations to improve user experience in the reactivity era. The problem is that in a reactive application, View objects have no state, and animations, on the contrary, have a state.

Good animations must meet three criteria:


How to achieve this:

But it is better to see once than hear a hundred times to read, so here is a video with the report.

Performance testing


The library for measuring application performance is now in alpha version as part of Jetpack. It allows you to take measurements of the performance of the code and avoids a lot of measurement errors, there is also integration with Android Studio.

What is worth remembering when writing and running performance tests using Jetpack Benchmark Library :



Conclusion



Badoo team and Google developer

Google I / O is definitely worth a visit. In such an atmosphere, over a cup of tea, you can hear many interesting stories and learn about interesting engineering solutions. For example, about how guys from VKontakte invented to make a dark theme and roll it out to users who asked: “Where is the dark theme?”, How on the other end of the Earth Tinder developers are struggling with spam and porn content and how the App in the Air team implemented autoregistration on air travel. You can also catch Google representatives creating the tools we use and ask questions.

In general, a conference of this level is not only a bunch of reports, but also many interesting people with whom you can exchange experiences.

Source: https://habr.com/ru/post/452618/


All Articles