Tag Archives: Play Store

Play Time with Jetpack Compose

Learn about Google Play Store’s strategy for adopting Jetpack Compose, how they overcame specific performance challenges, and improved developer productivity and happiness.

Posted by Andrew Flynn & Jon Boekenoogen, Tech leads on Google Play

In 2020, Google Play Store engineering leadership made the big decision to revamp its entire storefront tech stack. The existing code was 10+ years old and had incurred tremendous tech debt over countless Android platform releases and feature updates. We needed new frameworks that would scale to the hundreds of engineers working on the product while not negatively impacting developer productivity, user experience, or the performance of the store itself.

We laid out a multi-year roadmap to update everything in the store from the network layer all the way to the pixel rendering. As part of this we also wanted to adopt a modern, declarative UI framework that would satisfy our product goals around interactivity and user delight. After analyzing the landscape of options, we made the bold (at the time) decision to commit to Jetpack Compose, which was still in pre-Alpha.

Since that time, the Google Play Store and Jetpack Compose teams at Google have worked extremely closely together to release and polish a version of Jetpack Compose that meets our specific needs. In this article we'll cover our approach to migration as well as the challenges and benefits we found along the way, to share some insight into what adopting Compose can be like for an app with many contributors.

Play Store rewrote their UI with 50% less code with Compose

Considerations

When we were considering Jetpack Compose for our new UI rendering layer, our top two priorities were:

  1. Developer Productivity: Play Store team has hundreds of engineers contributing to this code, so it should be easy (and fun) to develop against.
  2. Performance: Play Store renders lots of media-heavy content with many business metrics that are very sensitive to latency and jank, so we needed to make sure it performed well across all devices, especially low-memory hardware and Android (Go Edition) devices.

Developer Productivity

We have been writing UI code using Jetpack Compose for over a year now and enjoy how Jetpack Compose makes UI development more simple.

We love that writing UI requires much less code, sometimes up to 50%. This is made possible by Compose being a declarative UI framework and harnessing Kotlin’s conciseness. Custom drawing and layouts are now simple function calls instead of View subclasses with N method overrides.

Using the Ratings Table as an example:

ratings table

With Views, this table consists of:

  • 3 View classes total, with 2 requiring custom drawing for the rounded rects, and stars
  • ~350 lines of Java, 55 lines of XML

With Compose, this table consists of:

  • All @Composable functions contained in the same file and language!
  • ~210 lines of Kotlin

buffering GIF

Animations are a hailed feature of Compose for their simplicity and expressiveness. Our team is building motion features that delight our Play Store users more than ever with Compose. With Compose’s declarative nature and animations APIs, writing sequential or parallel animations has never been easier. Our team no longer fears all the corner cases of animations around cancellation and call back chaining. Lottie, a popular animation library, already provides Compose APIs that are simple to work with.

Now you might be thinking: this all sounds great, but what about library dependencies that provide Views? It's true, not all library owners have implemented Compose-based APIs, especially when we first migrated. However, Compose provides easy View interoperability with its ComposeView and AndroidView APIs. We successfully integrated with popular libraries like ExoPlayer and YouTube’s Player in this fashion.

Headshot of Andrew

Performance

The Play Store and Jetpack Compose teams worked closely together to make sure Compose could run as fast and be as jank-free as the View framework. Due to how Compose is bundled within the app (rather than being included as part of the Android framework), this was a tall order. Rendering individual UI components on the screen was fast, but end to end times of loading the entire Compose framework into memory for apps was expensive.

One of the largest Compose adoption performance improvements for the Play Store came from the development of Baseline Profiles. While cloud profiles help improve app startup time and have been available for some time now, they are only available for API 28+ and are not as effective for apps with frequent (weekly) release cadences. To combat this, the Play Store and Android teams worked together on Baseline Profiles: a developer-defined, bundled profile that app owners can specify. They ship with your app, are fully compatible with cloud profiles and can be defined both at the app-level of specificity and library-level (Compose adopters will get this for free!). By rolling out baseline profiles, Play Store saw a decrease in initial page rendering time on its search results page of 40%. That’s huge!

Re-using UI components is a core mechanic of what makes Compose performant for rendering, particularly in scrolling situations. Compose does its best to skip recomposition for composables that it knows can be skipped (e.g. they are immutable), but developers can also force composables to be treated as skippable if all parameters meet the @Stable annotation requirements. The Compose compiler also provides a handy guide on what is preventing specific functions from being skippable. While creating heavily re-used UI components in Play Store that were used frequently in scrolling situations, we found that unnecessary recompositions were adding up to missed frame times and thus jank. We built a Modifier to easily spot these recompositions in our debug settings as well. By applying these techniques to our UI components, we were able to reduce jank by 10-15%.

Recomposition visualization Modifier in action

Recomposition visualization Modifier in action. Blue (no recompositions), Green (1 recomposition).

Another key component to optimizing Compose for the Play Store app was having a detailed, end-to-end migration strategy for the entire app. During initial integration experiments, we ran into the Two Stack Problem: running both Compose and View rendering within a single user session was very memory intensive, especially on lower-end devices. This cropped up both during rollouts of the code on the same page, but also when two different pages (for example, the Play Store home page and the search results page) were each on a different stack. In order to ameliorate this startup latency, it was important for us to have a concrete plan for the order and timeline of pages migrating to Compose. Additionally, we found it helpful to add short-term pre-warming of common classes as stop-gaps until the app is fully migrated over.

Compose unbundling from the Android framework has reduced the overhead in our team directly contributing to Jetpack Compose, resulting in fast turnaround times for improvements that benefit all developers. We were able to collaborate with the Jetpack Compose team and launch features like LazyList item type caching as well as move quickly on lightweight fixes like extra object allocations.

Headshot of Jon

Looking Ahead

The Play Store’s adoption of Compose has been a boon for our team’s developer happiness, and a big step-up for code quality and health. All new Play Store features are built on top of this framework, and Compose has been instrumental in unlocking better velocity and smoother landings for the app. Due to the nature of our Compose migration strategy, we haven’t been able to measure things like APK size changes or build speed as closely, but all signs that we can see look very positive!

Compose is the future of Android UI development, and from the Play Store’s point of view, we couldn’t be happier about that!

Simplifying our Play Store policies on gamified loyalty programs

Google Play is a vibrant platform where developers are constantly innovating to delight users and address emerging needs. Striking the right balance between developer creativity and user trust is critical to building a thriving ecosystem that enables these innovative solutions to become successful businesses. We accomplish this balance through a set of policies that are regularly reviewed and revised, to ensure that we do right by both developers and users.

App developers in India are actively building uniquely Indian features and services.  One example is the use of mini games, quizzes and other gamification techniques to delight users and convert them into loyal customers. These experiences are often launched during important festivals and sporting events, and getting it right within the specific time window is critically important. This is one of the things we discussed when we spoke to several startup CEOs in India and around the world in the past few months. And, as part of the very first policy update of 2021 we are clarifying and simplifying the policies around loyalty programs and features. 

Based on feedback from developers globally, we have updated our policy guidance on gamified loyalty programs that are based on a qualified monetary transaction in the app and offer prizes of cash or other real-world value. 

The update provides more clarity on policy requirements for loyalty program disclosures and features. It is designed to safeguard users and optimize the developer experience. For example, the policy provides updated guidance on the use of features such as a spin-the-wheel experience, a guessing game, or a 1:1 points redemption to drive loyalty. See the Play Policy Center for more details.

While we do not allow Real Money Gambling apps on the Play Store in India, we remain committed to engaging with industry and government bodies as they deliberate on measures that will best support this industry.

Today we are also launching a web resource called How Google Play Works – a repository of useful information and best practices to enable developers to continue delivering innovative and secure apps and games to people around the world. It also contains India-specific details on programs that local developers can leverage to find success and scale. For users, this site helps to demystify key aspects of the Google Play platform, and explains how user security and protection remains at the heart of everything we do.

As India’s digital ecosystem continues its exponential growth, we consider ourselves fortunate to play a part in its success. We are committed to enabling a trusted ecosystem and being responsive to the needs of India’s entrepreneurs as they build innovative and engaging experiences for consumers around the world.

Posted by Suzanne Frey, Vice President, Product, Android Security and Privacy


Protecting against harmful financial services products

Providing a safe and secure experience across Google’s products is our top priority. Our global product policies are designed and implemented with this goal in mind, and we're always working to improve our practices to enhance user safety. 

Personal loan apps have received attention recently, and we wanted to clarify the action we have taken on these apps on Google Play. 

We have reviewed hundreds of personal loan apps in India, based on flags submitted by users and government agencies. The apps that were found to violate our user safety policies were immediately removed from the Store, and we have asked the developers of the remaining identified apps to demonstrate that they comply with applicable local laws and regulations. Apps that fail to do so will be removed without further notice. In addition, we will continue to assist the law enforcement agencies in their investigation of this issue.   

Protecting users from deceptive financial products and services

All developers in the Play Store agree to the terms of the Google Play Developer Distribution Agreement, which stipulates that apps must adhere to applicable rules and laws, including generally accepted practices and guidelines. In addition, the Google Play Developer Policy requires financial services apps that offer personal loans to disclose key information such as the minimum and maximum periods of repayment, the maximum Annual Percentage Rate, and a representative example of the total loan cost. To help further ensure that users are making sound choices, we only allow  personal loan apps with full repayment required in greater than or equal to 60 days from the date the loan is issued. 

We believe transparency of information around the features, fees, risks, and benefits of personal loans will help people make informed decisions about their financial needs, thereby reducing the risk of being exposed to deceptive financial products and services. 

In addition, we publish reports of alleged local law violations, including those submitted by government agencies in our Transparency Report

Protecting user privacy 

To protect user privacy, developers must only request permissions that are necessary to implement current features or services. They should not use permissions that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. 

Developers must also only use data for purposes that the user has consented to, and if they later want to use the data for other purposes, they must obtain user permission for the additional uses. 

Google Play users expect a safe, secure and seamless experience, and developers come to Play for powerful tools and services that help them build and grow their businesses. Our policies help us deliver on these expectations, and we continue to work hard to ensure Google Play is a platform that supports the entire ecosystem.

Posted by Suzanne Frey, Vice President, Product, Android Security and Privacy 


Protecting against harmful financial services products

Providing a safe and secure experience across Google’s products is our top priority. Our global product policies are designed and implemented with this goal in mind, and we're always working to improve our practices to enhance user safety. 

Personal loan apps have received attention recently, and we wanted to clarify the action we have taken on these apps on Google Play. 

We have reviewed hundreds of personal loan apps in India, based on flags submitted by users and government agencies. The apps that were found to violate our user safety policies were immediately removed from the Store, and we have asked the developers of the remaining identified apps to demonstrate that they comply with applicable local laws and regulations. Apps that fail to do so will be removed without further notice. In addition, we will continue to assist the law enforcement agencies in their investigation of this issue.   

Protecting users from deceptive financial products and services

All developers in the Play Store agree to the terms of the Google Play Developer Distribution Agreement, which stipulates that apps must adhere to applicable rules and laws, including generally accepted practices and guidelines. In addition, the Google Play Developer Policy requires financial services apps that offer personal loans to disclose key information such as the minimum and maximum periods of repayment, the maximum Annual Percentage Rate, and a representative example of the total loan cost. To help further ensure that users are making sound choices, we only allow  personal loan apps with full repayment required in greater than or equal to 60 days from the date the loan is issued. 

We believe transparency of information around the features, fees, risks, and benefits of personal loans will help people make informed decisions about their financial needs, thereby reducing the risk of being exposed to deceptive financial products and services. 

In addition, we publish reports of alleged local law violations, including those submitted by government agencies in our Transparency Report

Protecting user privacy 

To protect user privacy, developers must only request permissions that are necessary to implement current features or services. They should not use permissions that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. 

Developers must also only use data for purposes that the user has consented to, and if they later want to use the data for other purposes, they must obtain user permission for the additional uses. 

Google Play users expect a safe, secure and seamless experience, and developers come to Play for powerful tools and services that help them build and grow their businesses. Our policies help us deliver on these expectations, and we continue to work hard to ensure Google Play is a platform that supports the entire ecosystem.

Posted by Suzanne Frey, Vice President, Product, Android Security and Privacy 


Understanding our Play gambling policies in India

Google Play is designed to provide a safe and secure experience for our consumers while also giving developers the platform and tools they need to build sustainable businesses. Our global policies have always been designed with that goal in mind, considering the good of all our stakeholders. 


We have the same goals for our gambling policy. We don’t allow online casinos or support any unregulated gambling apps that facilitate sports betting. This includes if an app leads consumers to an external website that allows them to participate in paid tournaments to win real money or cash prizes, it is a violation of our policies. 


We have these policies to protect users from potential harm. When an app violates these policies, we notify the developer of the violation and remove the app from Google Play until the developer brings the app into compliance. And in the case where there are repeated policy violations, we may take more serious action which may include terminating Google Play Developer accounts. Our policies are applied and enforced on all developers consistently.


We actively engage with our developer community for feedback while we define and refine our policies. Together, we will continue to create a safe and secure mobile app ecosystem for everyone. For more details on our policies, please take a look at our policy page which provides more details on the types of content in which regions are permitted.


Posted by Suzanne Frey, Vice President, Product, Android Security and Privacy

Bringing internet access to millions more Indians with Jio



Today we signed an agreement to invest $4.5 billion (INR 33,737 crore) in Jio Platforms Ltd, taking a 7.73 percent stake in the company, pending regulatory review in India. This is the first investment from the Google For India Digitization Fund announced earlier this week, which aims to accelerate India’s digital economy over the next five to seven years through a mix of equity investments, partnerships, and operational, infrastructure and ecosystem investments. 


Google and Jio Platforms have entered into a commercial agreement to jointly develop an entry-level affordable smartphone with optimizations to the Android operating system and the Play Store. Together we are excited to rethink, from the ground up, how millions of users in India can become owners of smartphones. This effort will unlock new opportunities, further power the vibrant ecosystem of applications and push innovation to drive growth for the new Indian economy.


This partnership comes at an exciting but critical stage in India’s digitization. It’s been amazing to see the changes in technology and network plans that have enabled more than half a billion Indians to get online. At the same time, the majority of people in India still don’t have access to the internet, and fewer still own a smartphone—so there’s much more work ahead. 


Our mission with Android has always been to bring the power of computing to everyone, and we’ve been humbled by the way Indians have embraced Android over recent years. We think the time is right to increase our commitment to India significantly, in collaboration with local companies, and this partnership with Jio is the first step. We want to work with Jio and other leaders in the local ecosystem to ensure that smartphones—together with the apps and services in the Play Store—are within reach for many more Indians across the country. And we believe the pace of Indian innovation means that the experiences we create for India can ultimately be expanded to the rest of the world.  


For Google, our work in India goes to the heart of our efforts to organize the world’s information and make it universally accessible. We opened our first Indian campuses in Bangalore and Hyderabad in 2004. Since then, we’ve made India central to our Next Billion Users initiative—designed to ensure the internet is useful for people coming online for the first time. We’ve improved our apps and services so they’re relevant in more Indian languages and created offline versions for those facing network constraints. We’ve extended our tools to small businesses, sought to close digital divides with initiatives like Internet Saathi, and we’re increasingly focused on helping India harness AI. More and more, apps we create for India—like Google Pay or our Read Along language-learning app—influence what we do globally. 


Jio, for its part, has made an extraordinary contribution to India’s technological progress over the past decade. Its investments to expand telecommunications infrastructure, low-cost phones and affordable internet have changed the way its hundreds of millions of subscribers find news and information, communicate with one another, use services and run businesses. Today, Jio is increasing its focus on the development of areas like digital services, education, healthcare and entertainment that can support economic growth and social inclusion at a critical time in the country’s history. 


In partnership, we can draw on each other’s strengths. We look forward to bringing smartphone access to more Indians—and exploring the many ways we can work together to improve Indians’ lives and advance India’s digital economy.

Posted by Sanjay Gupta, Country Head & VP, India, and Sameer Samat, VP, Product Management

How we fought bad apps and malicious developers in 2019

Posted by Andrew Ahn, Product Manager, Google Play + Android App Safety

Google Play connects users with great digital experiences to help them be more productive and entertained, as well as providing app developers with tools to reach billions of users around the globe. Such a thriving ecosystem can only be achieved and sustained when trust and safety is one of its key foundations. Over the last few years we’ve made the trust and safety of Google Play a top priority, and have continued our investments and improvements in our abuse detection systems, policies, and teams to fight against bad apps and malicious actors.

In 2019, we continued to strengthen our policies (especially to better protect kids and families), continued to improve our developer approval process, initiated a deeper collaboration with security industry partners through the App Defense Alliance, enhanced our machine learning detection systems analyzing an app’s code, metadata, and user engagement signals for any suspicious content or behaviors, as well as scaling the number and the depth of manual reviews. The combination of these efforts have resulted in a much cleaner Play Store:

  • Google Play released a new policy in 2018 to stop apps from unnecessarily accessing privacy-sensitive SMS and Call Log data. We saw a significant, 98% decrease in apps accessing SMS and Call Log data as developers partnered with us to update their apps and protect users. The remaining 2% are comprised of apps that require SMS and Call Log data to perform their core function.
  • One of the best ways to protect users from bad apps is to keep those apps out of the Play Store in the first place. Our improved vetting mechanisms stopped over 790,000 policy-violating app submissions before they were ever published to the Play Store.
  • Similarly to our SMS and Call Log policy, we also enacted a policy to better protect families in May 2019. After putting this in place, we worked with developers to update or remove tens of thousands of apps, making the Play Store a safer place for everyone.

In addition we’ve launched a refreshed Google Play Protect experience, our built-in malware protection for Android devices. Google Play Protect scans over 100B apps everyday, providing users with information about potential security issues and actions they can take to keep their devices safe and secure. Last year, Google Play Protect also prevented more than 1.9B malware installs from non-Google Play sources.

While we are proud of what we were able to achieve in partnership with our developer community, we know there is more work to be done. Adversarial bad actors will continue to devise new ways to evade our detection systems and put users in harm's way for their own gains. Our commitment in building the world's safest and most helpful app platform will continue in 2020, and we will continue to invest in the key app safety areas mentioned in last year’s blog post:

  • Strengthening app safety policies to protect user privacy
  • Faster detection of bad actors and blocking repeat offenders
  • Detecting and removing apps with harmful content and behaviors

Our teams of passionate product managers, engineers, policy experts, and operations leaders will continue to work with the developer community to accelerate the pace of innovation, and deliver a safer app store to billions of Android users worldwide.

Introducing Google Play Points in the U.S.

Posted by Paul Feng, Product Manager, Google Play

three mobile displays with apps At Google Play, we continue to build new experiences to delight users and help developers succeed. Today, we’re excited to announce that the Google Play Points rewards program is expanding to the United States following successful launches in Japan and Korea, where millions of people have already enrolled. The program is designed to show appreciation to our users and help increase engagement with your games and apps.

Google Play Points rewards users for any purchase they make on Play — including apps, games, in-app items, music, movies, books, and subscriptions - and for downloading select apps and games. For all developers, if you’re on Play billing, users will earn points on your apps and games immediately.

Play Points can then be redeemed for unique rewards like special items and discounts in Candy Crush, Homescapes, Lords Mobile and many others. We’re fortunate to be working with a select group of developers to offer these rewards for the U.S. launch — including Niantic, King, Electronic Arts, Playrix, Jam City, Kabam, Ludia, Kongregate, and others. Users can also redeem their points for Google Play Credit, and spend it on your app or game just as they do today.

Users are finding value in our initial Play Points markets, Japan and Korea, and developers there are incredibly happy with the results. In the future, we look forward to working with additional partners to deliver more unique rewards to users as Google Play Points evolves.

Google Play Points is rolling out in the US over the next few days. If you’d like to enroll as a user in the program, open the Play Store app on your Android device, tap menu, then tap Play Points to get started.

How useful did you find this blog post?

A new way to pay on Google Play Store — via UPI

https://lh6.googleusercontent.com/TZq0nw_gxo1FS4-m6aMq4PhbuyTbFeM2C_cyfSuW7TuTsNOsKdB34yWPf8VbJFabCgKTo176WkYLXACl174goOK77s4SPH5do3GSiyAsy2xVrchg5npdklmrbL4Zy82fjWEal-3X
The Google Play Store helps people find their favorite apps, games, movies, TV shows, music, books and more, on the device of their choice. With more than 2 billion active users in 190+ countries around the world, Play is also an important distribution platform for developers to build a global audience.


Indian app developers are already building successful businesses on the Google Play Store, offering a range of great apps across categories, and we are committed to helping them grow. One way to make this happen is to make it even easier for people to pay for apps and in-app content, which is why we are pleased to add Unified Payment Interface (UPI) as a new payment method to the existing roster of credit or debit card, net banking, direct carrier billing, and gift cards options.
UPI has grown over 50 times since its launch in August 2017, clocking 918 million transactions in August 2019 alone. A payment system that enables transfers, directly from one bank account to another, its ease and convenience has helped it outpace all other forms of digital payment in India. Users across the country are now choosing UPI for everything from utility bill payments, mobile recharges, in-store transactions and much more, and we’re pleased to bring its convenience to millions of users on Google Play.


Over the next few weeks on the Play Store in India, UPI will show up as a new payment option for purchasing apps, games, and in-app content using your preferred UPI app including BHIM, Google Pay, Paytm and PhonePe. Simply link your UPI ID (VPA or Virtual Payment Address) in Google Play Store Billing, and use your bank account to conveniently make app and in-app purchases.


The addition of UPI as a payment option on the Google Play Store allows even more people to enjoy premium apps, games, and in-app content, while helping developers and creators reach a wider audience for their apps and content.

Posted by Saurabh Agarwal, Head of Google Play Retail & Payments Activation - India, Vietnam & New Zealand

Supporting Google Play developers regarding local market withholding tax regulations

Posted by Gloria On, Program Manager, Google Play

Many developers are increasingly focused on growing their businesses globally, and there were more than 94 billion apps downloaded from Google Play in the last year, reaching more than 190 countries. The regulatory environment is frequently changing in local markets, and in some countries local governments have implemented withholding tax requirements on transactions with which Google or our payment processor partners must comply. We strive to help both developers and Google meet local tax requirements in markets where we do business, and where Google or our payment processor partners are required to withhold taxes, we may need to deduct those amounts from our payments to developers.

Due to new requirements in some markets, we'll be rolling out withholding taxes soon to all those doing business in those countries. We wanted to bring this to the attention of Google Play developers to allow you time to prepare for these upcoming changes and take any necessary measures to meet these obligations. We strongly recommend developers consult with a professional tax advisor on your individual tax implications in affected markets and for guidance on the potential impact on your business so that you can make any necessary preparations.

The first countries where we will roll out these changes will be Saudi Arabia, Kuwait, and Myanmar. You can refer to the Google Play help center page to stay informed on future updates and changes.

How useful did you find this blog post?