Posted by Kateryna Semenova, Android Developer Relations Engineer
Duolingo’s app began to experience growing pains due to scalability issues in their Android software architecture. They were able to solve these performance problems and regain developer productivity, by refactoring to a Model-View-ViewModel architecture and using Android Jetpack’s Dagger and Hilt for dependency injection. To learn more about how this impacted their business, read the accompanying article here.
Duolingo is the world’s most popular language learning app, with over ten million daily learners, because they’ve managed to make something people found daunting feel easy and fun. This continued success relies on a constant stream of innovations and updates — and a smooth-running app that can deliver all of them. To Duolingo, a single unresponsive app in a device anywhere in the world could mean a learner potentially discouraged. This commits them to app excellence, particularly on the Android devices used by sixty percent of their learners, including their CEO, who keeps track of the app from an entry-level phone. And so, when Duolingo's Android development team registered an increase in “App not Responding” errors, dropped frames — and even received a hand-written complaint — they took action immediately.
Their situation wasn’t that uncommon. Apps that lack scalable architecture and clear best practices often perform well at the beginning but show signs of technical debt as they grow. Duolingo’s Android codebase was designed to allow them to add and release new features rapidly, but the lack of an agreed-upon architecture was manifesting in increasingly frequent performance regressions. It was starting to suffer from unreliable frame rates, visually inconsistent or broken interactions, and a growing assortment of new bugs. These regressions not only inconvenienced learners but also cost the team substantial development effort to diagnose and repair. Duolingo’s Android development team realized that if they wanted to keep shipping new features while providing the target level of user experience, a new approach to their codebase was needed.
Discovery
First, they had to get to the bottom of what exactly was going on. A deep dive into the numbers uncovered that, as they added new functionality, the app’s rendering performance was regressing 5-10% every month. In fact, one particularly unwieldy release had increased crashes by 10%, slowed frame renders by 25%, and saw lessons starting 70% slower on entry-level devices.
Further analysis of their code led them to the conclusion that most of the app’s issues could be traced back to a single bottleneck: a global state object called DuoState, which was responsible for maintaining state across different features of the app. A number of popular features (like experience points and daily streak tracking) were using it to access vital information. Centralizing their data in this way had once enabled the team to iterate rapidly. They simply added properties to DuoState whenever a new feature needed to share information across the app. But now the unoptimized and frequent access to the object was causing increasing performance regressions.
DuoState was so tightly coupled to the entire codebase that even small changes could impact the rest of the app. The team feared that a minor new feature could have the unforeseen side effect of triggering many internal updates to the app, causing the entire release to be too slow for many devices. These performance regressions became more frequent as the app grew, and the team onboarded new engineers to keep up with the accelerating product roadmap. In 2020, as they added more developers, they were starting to see significant regressions cropping up as often as every 90 days. Upon closer inspection, the likelihood of a regression in a given release was proportional to the number of changes it implemented. At this rate, these regressions would completely derail the product roadmap within a few years.
This outdated architecture had become a bottleneck for both the performance of the app and the velocity of the team. After much internal debate, they stopped development of new features, including some closely tied to their bottom line. For two full months, Duolingo’s development team went all-in on refactoring their Android app in an effort they called the “Android Reboot”.
One of the team’s first key takeaways was that their code lacked clear boundaries. The DuoState object was readily available at any point in the code, inviting developers to access it frequently in inefficient ways. They needed to create a greater separation of concerns within the codebase. They decided to tease apart each feature into its own, clearly-defined module, using the Model-View-ViewModel architectural pattern. MVVM allowed them to remove calls to the monolithic DuoState object, letting many modules work in separate threads.
The team’s familiarity with MVVM, and Google’s support for it, made it an obvious choice. It allowed them to clearly document what logic should go into what files (including views, view models and repositories). This helped make their feature architecture more consistent. With a clear path to follow, the team quickly began refactoring their monolithic code into sets of classes with clear boundaries and responsibilities.
Along with MVVM, the team used Dagger and Hilt (also included in Android Jetpack) to implement repository patterns to replace DuoState. Dagger generates clear readable code that provides verbose error logging designed to help developers understand exactly what their code is doing, eliminating dead stack traces to reflected properties; and Hilt reduces the amount of boilerplate code needed to write for this.
This new architecture allowed the team to split DuoState into smaller objects. This immediately reduced unnecessary coupling between domains. For example, the code responsible for tracking a user’s progress could now access their experience points but not the number of times they’ve logged in during a month. These new architecture guidelines meant that while no single thing was too difficult to change, it took coordination and planning to change it across the app. Implementing the new architecture across the code base drove significant performance gains in aggregate.
MVVM architecture facilitates a separation of concerns between the domain data, the interface the learners see, and the logic for how these two realms interact. It gave Duolingo’s developers a more deliberate way to control how the app responds to internal state updates. They could now develop more complex user experiences without the risk of triggering regressions, or affecting the underlying business rules.
In the past, inconsistent application of development patterns made different parts of the codebase harder to understand and maintain. Without consensus, each developer implemented code as they saw fit.
MVVM, Dagger, and Hilt, provided the team with a more detailed understanding of how new features should be implemented. Following these best practices made the code easier and more predictable. Developers could now assist in debugging features that they hadn’t originally worked on. And new developers could be onboarded more efficiently; as long as they understood the architecture, they could contribute meaningfully right away. This new clarity significantly boosted the team’s development velocity.
Crucially, the new architecture also revealed that certain animation features in the app were underperforming on entry-level devices. Accordingly, the other core focus of the Android Reboot was the reduction of jank, dropped frames, and "App Not Responding” (ANR) errors. The team used repository patterns to help streamline the sharing of data between threads. These patterns ensured that they could more efficiently use device resources with multiple threaded modules. Moving work off the main thread improved responsiveness, overall frame rate, and led to smoother animations on entry-level devices. Performance on flagship devices improved as well.
In the six months working with the new architecture, Duolingo’s Android team has continued to ship new features without recording significant performance regressions. The days where they had to halt feature production to hunt and fix bugs are safely behind them.
The app’s daily ANR rate dropped 41%. The percentage of time that the app’s frame rate fell below target decreased by 28%. And importantly, users experienced a 40% increase in speed when scrolling through lessons, the leaderboard, and stories in the app.
The reboot allowed Duolingo to consistently provide their trademark fun, effective, and delightful language learning experience on a much wider range of Android devices.
Duolingo’s dedication to their mission made them the world's top app in the language learning space. Their commitment to app excellence — creating cutting edge educational experiences without compromising accessibility — is what kept them there.
If you’re interested in getting your team on board for your own Android Reboot, check out our condensed case study for product owners and executives linked here.
Posted by Tom Grinsted, Scott Lin, and Tat Yang Koh, Product Managers at Google Play
Ratings and reviews are important. They provide valuable quantitative and qualitative feedback on your users’ reported experience of your app or game, and the broader service that you offer. That’s why they’re one of the signals people use when deciding what to download on Google Play.
We’ve heard from both Play Store users and developers that ratings and reviews could be more helpful. This is especially true when ratings from one area unfairly impact another — like when a bug that only impacted a single country negatively affects the app’s rating everywhere; or when positive improvements in a tablet experience are overlooked because of the number of users on phones. So we’re starting a multi-quarter program of improvements to make ratings more personalized and indicative of the experience each individual user can expect, and to make them easier to navigate and use for developers:
We understand that many developers closely monitor the ratings that their potential users see, so we’re making sure you have plenty of notice about these upcoming changes. We’ve also made enhancements to Play Console to help you understand your ratings and reviews - especially across form-factors.
Expanding your support for different device types is one of the most important and impactful changes you can make to your user interfaces. Adding tablet-optimized layouts or better mouse and keyboard support for Chrome OS can result in a step-change in the quality of your users’ experience, which in turn influences their ratings and reviews.
New Device type ratings insights are available in Play Console ratings overview and breakdown pages
To make it easier to spot opportunities across various device types and track the impact of enhanced experiences, we’ve added new Device Type dimensions to the ratings page. We’ve also added a Device Type filter to your reviews so you can easily see how your tablet users are rating you, or what your users on Chrome OS say in their reviews.
Many of you have told us that you want to access more granular data than our selectors allowed. So, we’ve broken down your segmentation options and made them easier to use. You can now independently select the time period you want to plot (from the last 28 days through to your app’s complete lifetime), and how you want your ratings data to be aggregated (daily, weekly, or every 28 days). This allows you to access more granular data over longer periods of time.
Select any time range and aggregation period independently to find the ratings data you want
We’ve also enabled CSV downloads of your average data and rating distributions. Combined with the new data selection options, you can easily query and download much more of your data and perform offline analysis. For example, you could download your entire history of daily ratings distributions and correlate it in a spreadsheet with customer service contacts.
Access and download all your data including ratings breakdowns directly from the overview page
All of these changes are live in Play Console now. Visit Ratings analysis and Reviews to try them out.*
Ratings help people decide which apps to download and they are taken into consideration for featuring and placement on Play Store. But because the app experience can vary depending on the user’s region and device type, aggregate ratings don’t always tell the whole story. That’s why, starting in November 2021, we’re going to change the ratings that individual users see based on where they’re registered, and later in the year what device they’re using.
From November, this means that users on phones will see specific ratings for the country or region they’re based in. So a user in Japan will see app ratings generated from those submitted by other Japanese users.
Early next year we’ll further update ratings to reflect the device type users are browsing Play on, whether it’s: tablets and foldables, Chrome OS, Wear, or Auto. This will give users a better impression of the experience that they can expect for the device they’re using. We recommend you take a look at your form-factor ratings today - especially for tablets where growth is very strong - to see if you should invest in optimising your users’ experiences.
We understand that as a developer you will want to make sure you understand and get ahead of any major shifts in your user-visible ratings. So at least 10 weeks before any change in Play Store, we’ll automatically analyze the change your app can expect to see and reach out to any developer that will see a change of more that 0.2 stars on any device type in a key market (one with >5% of your store listing visitors). This will give you time to plan if you want to make key changes to your app.
These changes in Google Play will start to roll out from November with country or region-specific ratings. Look out for messages about your ratings in your Play Console Inbox towards the end of this year, and don’t forget that you can get ahead by checking your ratings by country and device-type today.
*Please note you need a Play Console account to access these links.
How useful did you find this blog post?
★ ★ ★ ★ ★
Posted by Jacob Lehrbaum Director of Developer Relations, Android
Great app experiences are great for business. In fact, nearly three-quarters of Android app users who leave a 5 star review on Google Play mention the quality of their experience with the app1; its speed, design, and usability. At Google, we want to help all developers achieve app excellence, and in turn help you drive user acquisition, retention, and monetization.
So what is “app excellence”? This may sound aspirational, but it is within reach for many apps. It starts with a laser focus on the user, and more specifically, with intuitive user experiences that get people to the main functionality of your app as quickly as possible — but that is just the beginning. Excellent apps are consistent across all of their screens and experiences. They perform well, no matter the device used. App excellence is achievable when all of the stakeholders who influence your app are invested in the experience of using your app.
One of the blockers that gets in the way of app excellence is shared or unclear accountability. Some of the primary measures of app quality, such as crashes and load times, are often seen as the responsibility of one group in the company, such as the engineering team. However, when we talk to best-in-class organizations2 about how they achieve app quality, it is clear that taking a cross-functional approach is key, with engineering, design, product, and business teams working toward a common goal.
So what are some internal best practices behind app excellence?
It’s a way easier conversation for me at the business end because I can say “these competitors’ apps are faster than ours; we need to reduce our load time down from 5 seconds to 4 seconds”.
Software engineer, x-platform app
App excellence helps drive business performance. New features are great, but if they slow down app start-up times or take up too much device space, people will eventually use your app less often or even delete it. Engineers who have built a company-wide focus on quality have often done so by quantifying the impact of quality issues on business performance, through:
Companies that organize teams around features — or stages in the user journey — are more likely to deliver consistent experiences across each operating system they support, bring new apps or features to market faster, and deliver a better app experience for all their customers. These teams are often cross-functional groups that span engineering, marketing, ux, and product — and are responsible for the success of a feature or user journey stage3 across all devices and platforms. In addition to better experiences and feature parity, this structure enables alignment of goals across functional areas while reducing silos, and it also helps teams hyper-focus on addressing specific objectives.
Squads focused on business objectives heighten focus on the user.
If a majority of your users are on a specific type of device, you can build empathy for their experience if you use the same phone, tablet or smart watch as your primary device. This is especially relevant for senior leadership in your organization who make decisions that impact the day-to-day experience of millions of users. For example, Duolingo has built this into their company DNA. Every Duolingo employee — including their CEO — either uses exclusively or has access to an entry level Android device to reflect a significant portion of their user base.
A user-centric approach to quality and app excellence is essential to business growth. If you are interested in learning how to achieve app excellence, read our case studies with practical tips, and sign up to attend our App Excellence Summit by visiting the Android app excellence webpage.
In subsequent blog posts, we will dig deep into two drivers of excellent app experiences: app performance and how it is linked to user behavior, and creating seamless user experiences across devices. Sign up to the Android developer newsletter here to be notified of the next installment, and get news and insights from the Android team.
Internal Google Play data, 2021. ↩
Google App Quality Research, 2021 ↩
The series of steps each user takes as they interact with your app is referred to as the “user journey.” Examples of user journey stages include installs, onboarding, engagement, and retention ↩
Posted by Kübra Zengin, Program Manager
Learning about Android development doesn’t mean you have to learn by yourself. Join fellow developers in your community and improve your skills by attending an Android Study Jam! Events are currently taking place across North America.
Android Study Jams are community events where developers come together to learn, create, and collaborate. Participants will follow guided codelabs designed to improve their development skills, all with an extra focus on improving the quality of applications.
These codelabs are created by the Android Developer Relations team at Google with three different tracks.
If you want to join an Android Study Jam, meet fellow developers, and learn alongside friends old and new, then check out this link to find an event!
Posted by Dave Burke, VP of Engineering
Today we’re bringing you the fourth Beta of Android 12, and moving into the final phase of the release. We’ve built Android 12 with a new UI that adapts to you, performance improvements, privacy and security enhancements, and more. We’re now shifting our focus to polish, performance, and stability. Thanks for all the feedback you’ve shared to help us refine the release and get us to this point.
For developers, Beta 4 takes us to Platform Stability, which means that Android 12’s APIs and all app-facing behaviors are finalized. For apps, the focus is now on compatibility and quality. It’s time to start preparing your compatible app updates in time for the official release later in the year.
You can try Beta 4 today on your Pixel device by enrolling here for over-the-air updates, and if you previously enrolled, you’ll automatically get today’s update. You can also get Android 12 Beta 4 on select devices from several of our partners like ASUS, OnePlus, Oppo, Realme, Sharp, and ZTE - learn more at android.com/beta. Visit the Android 12 developer site for details on how to get started.
Android 12 Beta 4 has reached Platform Stability, a milestone that means all app-facing surfaces and behaviors are now final in Android 12. This includes not only the official SDK and NDK APIs, but also final app-facing system behaviors and restrictions on non-SDK interfaces that may affect apps. So from Beta 4, you can confidently release your compatibility updates knowing that the platform won’t change. More on the timeline is here.
We’re asking all app and game developers to start your final compatibility testing now and prepare to publish your compatibility updates as soon as possible ahead of the final release.
For all SDK, library, tools, and game engine developers, it’s even more important to start testing now and release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates. When you’ve released a compatible update, be vocal and let developers know!
For Android, App compatibility means that your app runs as intended on a new version of the platform. You can check your app’s compatibility just by installing the production version of your app on a device or emulator and testing it - if the app looks good and runs properly, then you’re done, it’s compatible!
Testing your app for compatibility is important because with each release, we make integral changes to the platform that improve privacy and security and the overall user experience across the OS. These can affect your apps, so you should take a look at the behavior changes and test against them, then publish a compatible update to your users. It’s a basic but critical level of quality that ensures users have a good app experience.
As people update their devices to Android 12, they want to explore the latest version of Android, and experience it with their favorite apps. If those apps don’t work properly, it’s a major issue, ultimately resulting in uninstalls.
So while there are a ton of new APIs and capabilities to explore, start by testing your current app and releasing a compatible update first.
To test your app for compatibility with Android 12, just install your production app from Google Play or other source onto a device running Android 12 Beta 4. Work through all of the app’s flows and watch for functional or UI issues. Review the Android 12 behavior changes for all apps to focus your testing. Here are some changes to watch for:
Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.
Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help you detect issues quickly. Here are some of the changes to test for (these apply when your app’s targetSdkVersion is 31 or higher):
SCHEDULE_EXACT_ALARM
android:exported
During testing, also watch for uses of restricted non-SDK interfaces in your app and move those to public SDK equivalents instead. You can read about the restricted APIs here.
Today’s Beta release has everything you need to try the Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device to get the update over-the-air. To get started developing, set up the Android 12 SDK.
You can also get Android 12 Beta 4 on devices from some of our partners like ASUS, OnePlus, Oppo, Realme, Sharp, and ZTE. Visit android.com/beta to see the full list of partners participating in Android 12 Beta. For even broader testing, you can try Android 12 Beta 4 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator.
Beta 4 is also available for Android TV, so you can check out the latest TV features and test your apps on the all-new Google TV experience. Try it out with the ADT-3 developer kit. More here.
Watch for one more Beta coming in the weeks ahead as a release candidate for your final testing.
For complete details on Android 12 Beta, visit the Android 12 developer site.
Posted by Jeremy Walker, Engineer
Tiles provide quick access to information and actions with a simple swipe from the watch face home screen. This gives smartwatch users more control over what information and actions they want to see, and it’s no surprise that Tiles have become one of the most helpful and useful features for smartwatches that run on Wear OS.
Today we’re announcing Tiles can be shared with your smartwatch users. You can start creating your custom Tile by downloading the latest Alpha release of the Jetpack Tiles API. Once you upload your experience to Google Play, your users will be able to download your Tile and start using it. Let your users know they can try out the new experience. You can also upload a screenshot of your Tile to your Play Store preview assets within Google Play Console.
Apps such as Calm and Sleep Cycle have already started building custom Tiles.
"Using the new Tiles API, we were able to easily expose our Wear app features to be just a swipe away from your watch face." -Samo Kralj, Android Staff Software Engineer at Calm.
“The API was easy to understand and the documentation was quite clear, enabling us to have our first tile running with real data within hours. It feels like a very modern API that is easy to get started with.” -Viktor Åkerskog, Technical Lead at Sleep Cycle
We've appreciated all your feedback on the alpha library, and have included many of the requests and performance improvements into the APIs. You can add any additional feedback here to help us prioritize API improvements for future releases.
If you haven't had a chance to try out the API, check out the guide, or if you prefer a walkthrough, explore the Tiles codelab.
Happy coding!
Posted by Patricia Correa, Director, Global Developer Marketing
During the month of June we received thousands of submissions for two of our annual developer programs - the Indie Games Accelerator and the Indie Games Festival. These programs support the growth of small games studios on Google Play.
Every year we’re impressed with the art and creativity of the entries. This year was no exception. Many thanks to everyone who submitted their game.
Today, we’re announcing the finalists of the Festivals in Europe, Japan, and South Korea… drumroll, please.
Beat Workers by NaturalPad Games, France
Bird Alone by George Batchelor, United Kingdom
Cats in Time by Pine Studio, Croatia
Figment by Bedtime Digital Games, Denmark
Froglike: The Frog Roguelike by Jimjum Studios, Israel
Garson by Anastasiya Shabunia, Belarus
Gumslinger by Itatake, Sweden
Lyxo by Emoak, Austria
Psychofunk by Tommy Søreide Kjær, Norway
Railways by Infinity Games, Portugal
Sticky Terms by kamibox, Germany
Sweet Sins Superstars by Platonic Games, Spain
Tiny Robots Recharged by Big Loop Studios, Bulgaria
Tofu Drifter by Roach Games, Russia
Towers by JOX Development, Ukraine
Unholy Adventure by Dali Games, Poland
Warplane Inc by Nuclear Games, Russia
Watch Me Stream My Mental Breakdown by Ultaan Games, Poland
Woof: The Good Boy Story by CHPV.GAMES, Russia
Zen Symmetry by 8tbl, Russia
Sign up to attend the European finals.
3D Chess: NOCCA NOCCA by Curiouspark, Inc.
5colors in Nate by NekodoraSoft
Amabie san by HARAPECORPORATION Inc.
Archer Battle Online by Takuya Fujieda
Cthulhu DreamStairs by Tenyu
ElectriarCode by ELECTRIAR LABO
Escape from the Closed Circle by Hanachiru
Heart of Sengoku by ZEN APP
Leaving Two Tiles Dojo by ScreenPocket
Living in the Ending World by illuCalab.
MAKOTO WAKAIDO’s Case Files “Executioner’s Wedge” by HafHaf-Oden(Sukashiuma-LAB)
Mini Mini Farm by CoffeeBreak
MonohakobiPro by CGO
Mousebusters by Odencat
Numpurr Card Wars by Nukenin
Parasite Days by Zxima
Quantum Transport by ruccho
Super Glitter Rush by tiny cactus studio
Survivor's guilt by aso
Wolf Chess by Baton
Sign up to attend the Japanese finals.
Angel Saga by Alchemist Games Inc.
Animal Card Royale by Banjihagames
Animal Doll Shop by Funnyeve
BattleLive: Zombie&Human by PLOTRICK
Box It Up! Inc. by team TAPE
CATS & SOUP by HIDEA
Cats are Cute: Pop Time by kkiruk studio
Detective Mio by 1N1
Dicast: Rules of Chaos by BSS COMPANY
Forest Island by Nanali Studios
Frontier of Fortune by Dotomchi Games Inc.
FUNKYGUNNER by FUNKY5
Group Project Simulator! by Studio806
Gun Tactics by Gimle Games
Hybrid Warrior: Dungeon of the Overlord by Cat Lab
Metro Blossom by The Sane Studio
Portal Dungeon by Oblique Line
Rush Hour Rally by Soen Games
The Way Home by CONCODE
Titan Slayer by Touchholic
Sign up to attend the South Korean finals.
This year the three Festivals are virtual, so everyone has the chance to explore the games, meet the developers who made them, cheer them on, and be the first to hear who the winners are.
Expect plenty of fun and some very special surprises. So, don’t miss out. Sign up now to virtually attend the events showcasing the finalists from Europe, Japan, and South Korea. The events are free to attend and will all take place in the same space, so sign up to one and you will be able to teleport to all events!
If you’re interested in knowing which developers are joining the 2021 class of the Indie Games Accelerator, sign up to attend the European Festival, where we will also announce the selected developers.