Tag Archives: play

Increasing trust for embedded media

Posted by the Android team

Android WebView is a powerful and flexible API that Android developers can use to embed media in their apps, and continually improving its security and privacy protections is a top priority for our team. For example, embedded media providers should be able to verify that their media is playing in a trusted and safe environment. Android app developers and SDK providers already have solutions for this, including attestation services like the Play Integrity API and Firebase App Check, which preserve user privacy while enabling developers to verify their apps’ server requests. Today, app developers are able to pass information from these attestation services to embedded content providers; however, the current process is neither simple nor scalable. That’s why we’re piloting an experimental Android WebView Media Integrity API with select embedded media providers early next year.

How does this relate to the Web Environment Integrity API proposal?

We’ve heard your feedback, and the Web Environment Integrity proposal is no longer being considered by the Chrome team. In contrast, the Android WebView Media Integrity API is narrowly scoped, and only targets WebViews embedded in apps. It simply extends existing functionality on Android devices that have Google Mobile Services (GMS) and there are no plans to offer it beyond embedded media, such as streaming video and audio, or beyond Android WebViews.

What is the challenge with Android WebViews?

The Android WebView API lets app developers display web pages which embed media, with increased control over the UI and advanced configuration options to allow a seamless integration in the app. This brings a lot of flexibility, but it can be used as a means for fraud and abuse, because it allows app developers to access web content, and intercept or modify user interactions with it. While this has its benefits when apps embed their own web content, it does not prohibit bad actors from modifying content and, by proxy, misrepresenting its source.

What functionality are we bringing to embedded Android WebView media?

This sequence diagram shows a user requesting media in an Android app and the Android app returning the media in a manipulated WebView that could be used to alter the media and defraud the user.

The new Android WebView Media Integrity API will give embedded media providers access to a tailored integrity response that contains a device and app integrity verdict so that they can ensure their streams are running in a safe and trusted environment, regardless of which app store the embedding app was installed from. These verdicts are simple, low entropy metadata about the app and device and don’t contain any user or device identifiers. Unlike apps and games using Play Integrity API, media providers will not obtain the app’s Play licensing status and apps will also be able to exclude their package name from the verdict if they choose. Our goal for the API is to help sustain a thriving and diverse ecosystem of media content in Android apps, and we’re inviting media content providers to express interest in joining an early access program early next year.

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!

Boosting developer success on Google Play



Helping developers build sustainable businesses is a core part of Google Play’s mission. We work with partners every day to understand the challenges they face and help them bring their innovative ideas to life. Getting a new app off the ground and into orbit is not easy! To aid their quest for growth we provide a broad range of support, from powerful marketing tools and actionable data in the Play Console, education via Play Academy, best practices and thought leadership resources, programs such as the Indie Games Festival, Indie Corner, and accelerator programs around the world. We’re always looking for new ways to give their growth a boost.  


Today we are announcing a significant change for those developers that sell in-app digital goods and services on Play (e.g. gems in a game). Starting on 1st July, 2021 we are reducing the service fee Google Play receives to 15% for the first $1M (USD) of revenue every developer earns each year. With this change, 99% of developers globally that sell digital goods and services with Play will see a 50% reduction in fees. These are funds that can help developers scale up at a critical phase of their growth by hiring more engineers, adding to their marketing staff, increasing server capacity, and more.


While these investments are most critical when developers are in the earlier stages of growth, scaling an app doesn’t stop once a partner has reached $1M in revenue -- we’ve heard from our partners making $2M, $5M and even $10M a year that their services are still on a path to self-sustaining orbit. This is why we are making this reduced fee on the first $1M of total revenue earned each year available to every Play developer that uses the Play billing system, regardless of size. We believe this is a fair approach that aligns with Google’s broader mission to help all developers succeed. Once developers confirm some basic information to help us understand any associated accounts they have and ensure we apply the 15% properly, this discount will automatically renew each year. We look forward to sharing full details in the coming months.


Last year when we clarified the requirements of Google Play’s Payments policy, we explained that the service fee for Google Play is only applicable to developers who offer in-app sale of digital goods and services. More than 97% of apps globally do not sell digital goods, and therefore do not pay any service fee. For the developers in India that do sell digital goods, but have not yet integrated with Play’s billing system, they continue to have until 31st March, 2022 as announced previously.  For the thousands of developers in India that are already using Play to sell digital goods, they can start receiving the benefit of this change as soon as it goes into effect in July.


As a platform we do not succeed unless our partners succeed. Android and Google Play have always listened to our developer partners from around the world and we continue to take their input into account as we build and run the ecosystem. We look forward to seeing more businesses scale to new heights on Android, and to further discussions with the Indian developer community to find new ways to support them technically and economically as they build their businesses.


Posted by Sameer Samat, Vice President, Android and Google Play

YouTube Music is Making it Simple to Transfer Over Your Google Play Music Library

Over the past few years, we have enhanced YouTube Music to deliver a comprehensive listening experience, and have also added features to make Google Play Music users feel right at home. Starting today, we’re excited to officially begin inviting Google Play Music listeners to effortlessly transfer their music libraries, personal taste preferences and playlists to YouTube Music, their new home for music listening and discovery.
For now, users will continue to have access to both services. We want to ensure everyone has time to transfer their content and get used to YouTube Music, so we’ll provide plenty of notice ahead of users no longer having access to Google Play Music later this year.
Easy Transfer and Transition 
We know many listeners have spent a lot of time creating their perfect music and podcast libraries in Google Play Music, so we’ve made it simple to move both to their new homes. All Google Play Music users will soon receive an email with detailed instructions on how to begin transferring your full Google Play Music history and content, as well as podcasts, to their new homes.
Music fans will be able to start the transfer process of their music library to YouTube Music by following these simple steps:

  • Download the YouTube Music app (iOS/Android). 
  • Click on the transfer button in YouTube Music, and your uploads, purchases, added songs and albums, personal and subscribed playlists, likes and dislikes, curated stations and personal taste preferences will move right over. 
  • Your updated recommendations will appear immediately on the YouTube Music home screen, and we’ll notify you via email and notifications when your music library transfer is complete and your music is in the “Library” tab. 

You can also check out the video with transfer details HERE.

And if you’re a podcast listener, you can visit this web page and transfer your subscriptions and episode progress to Google Podcasts with a single click. Google Podcasts is our dedicated podcast player available for free on Android and iOS, and accessible from Google Assistant, Google Search, Google Home and more.
We’re looking forward to Google Play Music users transferring their libraries, so they can begin listening and exploring on YouTube Music and Google Podcasts.
Your New Home For Music: YouTube Music
For listeners new to YouTube Music, the streaming service is your personal guide to the world of music, simply organised in an app and web player. A bit more on what YouTube Music has to offer:

  • Catalogue: YouTube Music offers over 50 million official tracks, albums and high quality audio, as well as deep cuts, B-sides, live performances, and remixes you can’t find anywhere else. 
  • Listen everywhere: Explore YouTube Music’s audio-first music app, desktop and smart speaker experience. 
  • Recommendations: Discover new music through YouTube Music’s home screen recommendations and personalised mixes - My Mix, Discovery Mix, and New Release Mix - based on taste, location, time of day and Play Music preferences after transferring. 
  • Official Playlists: Listen to thousands of official playlists from both YouTube Music and Google Play Music. 

We’ve listened to Google Play Music user feedback and recently introduced additional new features to YouTube Music for fans to enjoy. Some of the YouTube Music features we’re most excited to share include the following (with more updates on the way!):

  • Playlist Creation: We’ve increased playlist length from 1,000 to 5,000 songs to make room for even more of your favourite songs. 
  • Uploads: You can listen to your uploaded and purchased music from Google Play Music after your transfer, or add up to 100,000 personal tracks to your library in YouTube Music (an increase of more than 50,000 compared to Google Play Music). 
  • Offline listening: Paying members can download any song, playlist, music video or let smart downloads (Android only for now) do it for you so you always have something to listen to, even when you don’t have service. 
  • Lyrics: Lyrics offer highly visible access to follow along to tracks. 
  • Explore Tab: An all-new Explore tab offering one go-to place to discover new music and YouTube Music’s vast catalogue of playlists through New Releases and Moods & Genres sections. 

Pricing 
Existing pricing is the same between Google Play Music and YouTube Music. Fans can enjoy the ad-supported version of YouTube Music for free, or enjoy YouTube Music Premium, a paid membership that gives listeners background listening, downloads and an ad-free experience for $11.99 a month. Or you can try YouTube Premium to extend ad-free, background listening and offline playback across all of YouTube for $14.99.
Google Play Music Unlimited members will be automatically granted the equivalent tier of YouTube Music Premium or YouTube Premium based on the level of benefits with their current subscription, at the same price*.
We can’t wait for you to start exploring YouTube Music features and discovering new music favourites along the way. Have more questions or need help? Check out all of our support resources here.
*Some users may see a price difference upon transfer. Learn more here.

I/O 2019: New features to help you develop, release, and grow your business on Google Play

Posted by Kobi Glick, Product Lead, Google Play

Play and #io19 logos with geometric shapes

Over the last 10 years, we’ve worked together to build an incredible ecosystem with more than 2.5 billion active users in over 190 countries. This would not be possible without you and all the fantastic apps and games you’ve built that entertain, help, and educate people around the world.

Every month, you upload more than 750,000 APKs and app bundles to the Play Console. We’ve been amazed by your enthusiasm, and it’s been our privilege to help you grow your business. This year, we want to help you go even further. So today at Google I/O, we're announcing new tools and features to help you develop, release, and grow your apps and games — many of them based on your feedback and suggestions.

Efficient, modular apps and customizable feature delivery

Last year we introduced Android's new publishing format, the Android App Bundle, and an entirely new dynamic delivery framework on Google Play. There are now over 80,000 apps and games using app bundles in production, with an average size savings of 20%. As a result of those savings, apps have seen up to 11% install uplift. As the future of app delivery, we’re excited to share these latest enhancements to the Android App Bundle.

Dynamic features are out of beta and available to all developers, including these new delivery options:

  • On-demand delivery — install features when they’re needed or in the background, instead of delivering them at install time, and reduce the size of your app.
  • Conditional delivery — control which parts of your app to deliver at the time of install based on the user’s country, device features, or minimum SDK version.
  • Instant experiences — now fully supported, so you only need to upload one artifact for your installed app and Google Play Instant experiences.

During our beta program, many developers implemented interesting use cases with dynamic features. Netflix, for example, now delivers their customer support functionality as a dynamic feature to users who visit the support center. By making functionality available only to users who need it, Netflix reported a 33% reduction in app size. You can learn more in the video below.

Seamless internal testing and increased security

We heard you loud and clear: testing bundles is hard. But with the new internal app sharing, you can now share test builds in a matter of seconds. Just upload your app bundle to Google Play and get a download URL to share with your testers. You don’t need to worry about version codes, signing keys, or most other validations that your production releases need to conform to.

In addition to efficiency and modularity, the Android App Bundle also now offers increased security with the launch of app signing key upgrade for new installs. With this feature, you can upgrade the cryptographic strength of your signing key for new installs and their updates on Google Play. Many developers sign their apps with keys generated a long time ago, and this new feature is the only backwards-compatible way to increase their strength.

Easier for users to update

Although auto-updates reach many users, you told us it was still challenging to get some users to update your apps. Now that our new in-app updates API is in general availability, users will be able to update without ever leaving your app. During our early access program, many developers used our API to create a polished upgrade flow, resulting in a median acceptance rate of about 50%.

The API currently supports two flows:

  • The “immediate” flow is a full-screen user experience that guides the user from download to update before they can use your app.
  • The “flexible flow” allows users to download the update while continuing to use your app.
Two iPhones side by side. The first on displaying Immediate update flow with a pop up recommending an update. The second displaying Flexible update flow with a pop up recommending an update.

Stronger decision-making with new Google Play Console data

The right data can help you improve your app performance and grow your business. That’s why we’re excited to tell you about new metrics and insights that will help you better measure your app health and analyze your performance.

  • Core metrics refresh — better understand your acquisition and churn, including data on returning users, automatic change analysis, install method (such as pre-installs and peer-to-peer sharing), metric benchmarking, and the ability to aggregate and dedupe over periods from hours to quarters.
  • App size metrics and reports — gain insights about your app size in Android vitals, including download size, size on device (at install time), changes compared to peers over time, and tailored optimization recommendations.
  • Developer-selected peer benchmarks — create a custom set of 8-12 peers to compare your app to, then see the median value of the set and the difference between your app and its peers for Android vitals data as well as for public metrics like your rating.
  • Market insights with curated peersets — in the coming months, you’ll also be able to compare your growth against an automatically generated, curated peerset of around 100 apps similar to yours for business-sensitive metrics like conversion rate and uninstall rate.
Android Vitals Overview dashboard on Peer group screen

Making it easier to respond to and improve user reviews

We’re also making big changes to another key source of performance data: your user reviews. Many of you told us that you want a rating that reflects a more current version of your app, not what it was years ago — and we agree. So instead of a lifetime cumulative value, your Google Play Store rating will be recalculated to give more weight to your most recent ratings. Users won’t see the updated rating in the Google Play Store until August, but you can preview your new rating in the Google Play Console today.

Every day, developers respond to more than 100,000 reviews in the Play Console, and when they do, we’ve seen that users update their rating by +0.7 stars on average. So in addition to the ratings change, we're making it easier to respond to reviews with suggested replies. When you go to respond to a user, you’ll see three suggested replies which have been created automatically based on the content of the review. You can choose to send one as-suggested, customize a suggestion for more personalization, or create your own message from scratch. Suggested replies are available in English now with additional languages coming later.

Google user review with suggested replies in Beta.

Better Google Play Store listing targeting and customization

Your store listing is where users come to learn more about your app or game and decide whether to install. It’s important real estate, so we’re releasing new features that let you optimize your Google Play Store to address different moments in the user lifecycle.

  • Following the launch of custom listings by country at GDC, we’re announcing a new early access program that lets you create custom listings by install state. Increase acquisition, retention, and re-engagement by providing customized marketing messages for users who haven’t installed your app, users who have your app, and users who have uninstalled your app. If you’re interested in joining the program, sign up here.
  • Now that pre-registration is available to all developers, we’re launching two new features to help you make the most of it: custom listing pages for pre-registration and pre-registration rewards, which let you incentivize players for signing up for notifications before you launch.

Learn more about these and other Google Play features at Google I/O. Join us live or watch later on the Android Developers YouTube channel.

You can also take your skills and knowledge to the next level with our e-learning courses on Google Play’s Academy for App Success, and sign up for our newsletter to stay up to date with our latest features and updates.

How useful did you find this blog post?

A better way to track your promotions on Google Play Billing

Posted by Neto Marin, Developer Advocate

Promotions can be a valuable tool to increase user engagement or attract new users by offering content or features to a limited number of users free of charge.

We are happy to share an improvement in the Google Play Developer API that makes it easier to track your promotions from your own backend. Starting today, the API for Purchases.products will return "Promo" as a new value for the field purchaseType when the user redeems a promo code. Now, the possible values are:

  • 0. Test (test purchases)
  • 1. Promo (Promo code redemption purchase)

For purchases made using the standard in-app billing flow, the field will continue to not be set in the API response.

Please note: This state is only returned by the Purchases.products API. For subscriptions you may use Free Trials to offer free of charge subscription periods.

For more details about how to create and redeem promo codes, check the In-app Promotions documentation. For more details about the server-side API, check the Google Play Developer API documentation.