Android Makers Paris 2022. Android Makers Conference begins… | by Kamal Farag | April 2022

Illustration from

The Android Makers Conference kicks off in Paris on April 25 for two days of sessions, workshops and presentations. It gathered more than 600 attendees for more than 60 sessions.

Thanks to frog France, I had the opportunity to attend the conference and I am happy to share with you my notes on some of the sessions. If you want to go further, take a look at the replays available on YouTube.

Why Enterprise Succeed: Lessons Learned from Android

Did you know that Android started in 2003 as a digital camera platform called FotoFarm? Now you know! Due to a lack of interest, the venture expanded to include phones and was acquired by Google in 2005. In 2007, it launched the first iPhone and revamped the phone industry, increasing competition. In the same year, the first Android SDK was released and one year later, Android 1.0 was released on the T-Mobile G1.

What we can learn from Android is that having the right team, working hard, charging something and making good decisions are the keys to success. Timing is also very important, as well as a bit of luck.

If you want to learn more about the history of Android, I recommend reading the book Androids: The Team That Created the Android Operating System.

photo by syria

The Ultimate Guide to Android Library Development

An app can be either an APK or an Android app bundle while a library can be either JAR or AAR.

Libraries require additional development considerations compared to applications and more requirements when deploying to Maven Central:

  • Reduce transitive dependencies and favor stable versions
  • Minimize public APIs and avoid breaking changes
  • Declaring public resources and avoiding conflicts
  • ProGuard Consumer Shipping Rules
  • Record files with GPG / PGP
  • Send a POM . file

Where and how do UI tests take place?

UI tests ensure good integration of other, smaller units that are already covered by unit tests. Troubleshooting before shipping to production is more efficient because it takes a long time to deploy hotfix versions.

However, UI testing is a pain and contains a lot of tasks like writing, running and collecting automated test results.

The AndroidJUnitRunner The Android Test Orchestrator allows you to create, install, and run tests on devices. Each test runs its own Instrumentation But it may not be completely isolated because cached data can persist and must be cleared between tests. To solve the problems of flake, speed, and tools, you can use test runners such as a marathon.

Also, testing on a real device provides higher accuracy while testing on an emulator provides more control. Since the emulator is fast to run and highly configurable, it is a good idea to use it with Docker images.

How to share code with internal libraries

At Deezer, developers share code common to different apps and form factors such as Android TV or Wear OS, using internal libraries published in the Maven repository.

They decide to only share code that is reused multiple times while retaining certain consumer behaviors. The libraries are divided into smaller libraries to include only what each consumer needs.

Each library can contain multiple modules and have a sample implementation for testing and iterating quickly. For simplicity, they use a unique Git repository which contains multiple Gradle projects with the same version for all the libraries. In more complex projects, the Bill of Materials can be used.

The stable versions are released with the same rhythm of the applications while the snapshot versions are released at night.

As a best practice, even for private libraries, don’t forget the documentation and release notes.

To smartphones and beyond: screens everywhere

Historically, Android devices were only phones or tablets. Now, foldable devices make that distinction completely obsolete with dynamic scaling.

Screen size isn’t the only aspect to consider, the ratio can also change drastically from one device configuration to another, so it’s always important to try apps on multiple devices, navigate with different inputs and consider accessibility.

To handle multiple partners and devices, Disney Streaming has invested in the R2D2 Framework, an internal framework to simplify testing with all the complex form factors and partners.

Untangling Coroutine Test

The kotlinx-coroutines-test The library has changed significantly since version 1.6.0 and is designed to test coroutines with ease.

The first thing to use is a file runTest The coroutine generator to test the code that needs to be run in the coroutine. will create a file TestScope will always use a file TestDispatcherwhich will be either StandardTestDispatcher by default or UnconfinedTestDispatcher.

Always inject senders, so that if the code under test passes execution to a different sender, it can be replaced with TestDispatcher. For cases where the transmitter cannot be injected, for example using a viewModelScopeuse Dispatchers.setMain before the test and Dispatchers.resetMain after the test. Finally, keep in mind that unlike cold streams, hot streams are not completed naturally.

For more information, see our updated guide on testing Kotlin coroutines on Android.

The future of design is still personal: Reaching true adaptation

When talking about design, it is important to distinguish user interface and user experience. UI stands for User Interface while UX stands for User Experience. Looking at a button for example, UI determines the appearance of the button while UX determines its use.

Material You is the new design system available with Android 12, it goes beyond Material Design and makes the user experience more personal. But don’t forget that they are different user experiences like users.

photo by syria

Create a UI toolkit from scratch

The UI toolkit’s responsibilities are to determine how the component is positioned, how it is drawn, and how it interacts with the input.

The Views UI toolkit is based on inheritance, which is difficult to maintain, while the UI toolkit depends on the configuration that favors reuse. For this reason, Views has moved to “Create” to simplify the advertisement.

If you want to learn how to build a UI kit from scratch, Apex is a sample UI kit developed by Romain Guy and Chet Haase based on the Entity-Component-System.

Jetpack DataStore – Protocol Buffer Storage Solution

Jetpack Datastore is an alternative to the platform SharedPreferences.

It allows saving key-value pairs using the Preferences DataStore but also objects written using Proto DataStore and protocol buffers.

Most importantly, it offers built-in support for coroutine which makes it the storage solution for modern Android development.

Improve construction times in less time

Building time has a huge impact on productivity and has always been a challenge to improve. A build scan analysis can help you determine what is taking too long but here are some tips.

Using annotation processors, buildSrc The JaCoCo directory or plugin can negatively affect build time, just like mixing IDE and command line because it loses performance improvements.

On the other hand, the use of build cache, incremental compilation, sprites and configuration avoidance can positively affect build time, as well as buying Apple Silicon.

How to become a mentor, why and how?

Mentoring is all about making people grow, giving back to the community and building a network for the long term. Most of the time the mentor is a senior engineer, and in all cases the apprentice is a less experienced engineer.

It is important to build a safe environment for the trainee where they can make mistakes, ask questions, and learn. Initially, the mentor can equip the trainee in a company, project or database. Then, continue pairing and revisions, be patient, be humble, and remind the trainee that the mentor makes mistakes, too. Finally, give feedback constantly and also celebrate successes.

Create your own design system with Jetpack Compose

Compose is the future of Android UI development and can be progressively integrated into an existing application using a design system.

The design system can be built on top of highly configurable Material Design, or from scratch to better suit your needs. Doing so requires developing atoms like colors and icons, then developing molecules based on those atoms, etc. Having a modular implementation in the design system makes it easy to test and maintain.

Kotlin adventures and authorship through a multi-platform world

Kotlin Multiplatform is not a framework, it’s an SDK designed to share code with different platforms in a single code base.

It is better suited to business logic that is platform independent while the user interface can still be developed on-premises or using a framework. When needed, use a file expect The common symbol keyword and actual A keyword for a platform-specific app like Android, iOS, or desktop. Compose is the right choice of UI because Compose Compiler and Compose Runtime are platform neutral while Compose UI toolkit is available for each platform.

Multiple libraries support Kotlin Multiplatform and apps like Netflix already use it.

Architecture: sermon sermon

Last but not least, this version of Android Makers, or rather Android Wakers, ended with the traditional comedy talk by Chet Haase and Romain Guy discussing architecture with loads of fun!

photo by syria

Leave a Comment

Your email address will not be published.