Author Archives: Android Developers

Let’s go. It’s Google I/O 2023

Posted by Jeanine Banks, VP & General Manager, Developer X, and Head of Developer Relations

Google I/O is back and you’re invited to join us online May 10! Learn about Google’s latest solutions, products, and technologies for developers, that help unlock your creativity and simplify your development workflow. You’ll also get to hear about ways to use the latest in technology, from AI and cloud, to mobile and web. Tune in to watch the live streamed keynotes from Shoreline Amphitheater in Mountain View, CA, then dive into 100+ on-demand technical sessions and engage with helpful learning material. Visit the Google I/O site and register to stay informed about I/O and other related events coming soon.

Want to get a head start?

Stay tuned for more updates. We look forward to seeing you in May!

Let’s go. It’s Google I/O 2023

Posted by Jeanine Banks, VP & General Manager, Developer X, and Head of Developer Relations

Google I/O is back and you’re invited to join us online May 10! Learn about Google’s latest solutions, products, and technologies for developers, that help unlock your creativity and simplify your development workflow. You’ll also get to hear about ways to use the latest in technology, from AI and cloud, to mobile and web. Tune in to watch the live streamed keynotes from Shoreline Amphitheater in Mountain View, CA, then dive into 100+ on-demand technical sessions and engage with helpful learning material. Visit the Google I/O site and register to stay informed about I/O and other related events coming soon.

Want to get a head start?

Stay tuned for more updates. We look forward to seeing you in May!

Tune in on Thursday to watch #TheAndroidShow

Posted by the Compose team

In just a few days, on Thursday, March 9 at 10AM PT, we’ll be kicking off another episode of #TheAndroidShow! In this episode, we’ll unpack the latest Android foldables and large screens for you to get building on, straight from Mobile World Congress last week in Barcelona, and sharing with you how to get started building.

Tweet us your Compose layouts & modifiers questions using #AskAndroid

In this episode of #TheAndroidShow, we’ll also be hosting a live Q&A from our latest MAD Skills series spotlighting the essentials of Compose layouts and modifiers. The initial episodes cover layout fundamentals including what out-of-the-box APIs Compose offers, how you can use modifiers to stylize your composables, and the different phases in Compose. We then dive deeper into modifier chaining and building custom layouts for complex use cases. The series culminates in a live Q&A where we’ll be answering your questions. You can view the YouTube playlist to rewatch the videos in the series. Tweet us your burning Compose layouts and modifiers questions using #AskAndroid. We've assembled a team of experts ready to answer your questions live!

#TheAndroidShow is your conversation with the Android developer community, this time hosted by Rebecca Gutteridge and Madona Wambua. You'll hear the latest from the developers and engineers who build Android. Don’t forget to tune in live on March 9 at 10AM PT, broadcast live on YouTube!

Keeping Android and Google Play safe with our key 2023 initiatives

Posted by Bethel Otuteye, Senior Director, Product Management, Android App Safety

It’s our top priority to keep Android and Google Play safe for developers to build successful businesses and provide quality apps and games to billions of users around the world. Over the past years, we’ve continued to share more tools to help protect your apps, evolve our policies to help keep people and their families safe and secure, and collaborate with you to build more private advertising technology.

We know it can be difficult to keep up with how quickly the privacy and security landscape evolves. So, we’ve been sharing more product and policy support, frequent updates about our work, and advance notice about changes. As we did last year, we’re sharing a preview of some of our key priorities that we’re excited to collaborate with you on, on the behalf of our shared users.

What we look forward to this year

Building a more privacy-friendly approach to advertising

Last year, we announced the Privacy Sandbox on Android, an industry-wide initiative to raise the bar for user privacy and ensure continued access to free content and services. Building on our web efforts, we’re developing solutions for digital advertising that limit user data sharing and don't rely on cross-app identifiers. We’re working closely with the industry to gather feedback and test these new technologies.

Now, we’re entering the next phase of this initiative: Rolling out the first Beta for the Privacy Sandbox on Android to a small percentage of Android devices. With the Beta, users and developers will be able to experience and evaluate these new solutions in the real world. See our developer guidance on how to participate in the Beta and follow our Privacy Sandbox blog for regular updates. We’ll continue to work in collaboration with developers, publishers, regulators and more as we navigate the transition to a more private mobile ecosystem.

Giving people more control over their data

Developers want to build consumer trust by showcasing responsible data practices in a way that’s simple and easy to understand. Over the past few years, we’ve helped developers provide more transparency around if and how they collect, share, and protect user data. This year, we’ll continue improving Google Play’s Data safety section with new features and policies that aim to give people more clarity and control around deletion practices.

You can also enhance your users’ safety by reducing the permissions you request for accessing users’ data. Your app can often leverage privacy-preserving methods for fulfilling its use case. For example, you can use the photo picker intent to allow users to select individual photos to share with your app rather than requesting access to all the photos on their device through runtime permissions. You can also start testing privacy, security, and transparency enhancements in our Android 14 Developer Preview 1. Stay tuned to our Android 14 and Google Play policy updates, as we’ll share more soon.

Protecting your apps from abuse and attacks

Developers have told us that they want more help protecting their business, users, and IP. So, we’ve continued enhancing Play Integrity API and automated integrity protection to help you better detect and prevent risks, and strengthen your anti-abuse strategy. Developers who use these products have seen an average of over 50% reduction in unauthorized access of their apps and games. Get started today with the Play Integrity API. And, stay tuned for some highly-requested feature updates to integrity products and expanded access to automatic integrity protection.

Helping you navigate SDKs

Developers have shared that they want more help deciding which SDKs are reliable and safe to use. So, we’ve created ways for SDK providers to directly message you through Play Console and Android Studio about critical issues for specific SDK versions and how to fix SDK-related crashes. We’ve also launched Google Play SDK Index to give you insights and usage data for over 100 of the most popular commercial SDKs on Google Play. Soon, we’ll share even more information about sensitive permissions an SDK may use and whether specific SDK versions may violate Google Play policy. By partnering with SDK providers to build safer SDKs and giving you greater insight, we hope to help you and your users avoid disruptions and exposure to risks.

Enhancing protections for kids and families

We’re proud that together with developers, we have made Google Play a trusted destination for families to find educational and delightful experiences for kids. Over the past years, we’ve launched new features, expanded our programs, and evolved our policies to improve app experience and strengthen privacy and security protections. This year, you’ll continue to see improved ways for Google Play to help families discover great apps and more policy updates to protect kids’ safety. Stay updated through our policy email updates and PolicyBytes videos.

Boosting responsible data collection and use

We continue to emphasize that developers and apps should only collect and use data that’s required for their apps to function and provide quality user experiences. This year, you’ll continue to see new permission and policy requirements. Stay updated through our policy email updates and PolicyBytes videos.
 
Fostering developer innovation, while keeping users safe

As a platform, we’re always looking to understand the challenges developers face and help them bring innovative ideas to life. While Google Play already hosts a variety of blockchain related apps, we’ve increasingly heard from developers who want to introduce additional web3 components, including the tokenization of digital assets as NFTs, into their apps and games. With any new technology, we must balance innovation with our responsibility to protect users, which is why we’ve begun conversations with developer partners to assess how potential policy changes could responsibly support these opportunities. As always, engaging with developers is an essential part of how we evolve our platform and maintain a safe, transparent, and trusted experience for our shared users. We hope to have more to share in the coming months.
 
Giving you a better experience with our policies and Console

We’re continuously improving our policy communication, support, and experience. We’ve recently introduced a new Play Console feature to give you more flexibility and control over the app review process. This year, we’ll provide even more features and support.

Developers have shared that they want a place to ask questions and hear from others. So in February, we opened up the Google Play Developer Community to all developers in English so you can ask for advice and share best practices with fellow developer experts. Developers have shared positive feedback about this new forum, and we welcome you to sign up to be a Product Expert (select Play Console as your product and English as your language).

We’re also expanding our pilot programs like the Google Play Developer Helpline pilot, which provides direct policy phone support. Today, we’ve expanded the pilot to nearly 60,000 in 26 countries (16,000 more developers and 9 more countries since November). We’ve completed nearly 5,000 policy support sessions with developers and with a satisfaction score of 90%.

And last, we’ve also been sending you more notices and reminders about upcoming requirements to your Developer Console Inbox, so we reach you when you’re thinking about updating your app. This year, we’re also building a new feature to help you plan ahead about declarations.

We’ll continue to share updates with you throughout the year. Thank you for your partnership in keeping Android and Google Play safe and trustworthy for everyone.

Policy Updates: New Wear OS App Quality Requirements

Posted by Ishaan Aggarwal, Product Manager

Today we are announcing upcoming policy changes intended to improve the quality of apps for Wear OS and their presentation in the Google Play Store. We are introducing these changes to ensure app users get a basic consistent experience across all apps in accordance with our latest Wear OS design and development principles. In addition, updates to the publishing requirements will improve the discovery and presentation of your Wear OS apps in the Google Play Store.

The new requirements will come into effect from August 31, 2023. Until then, we will continue to use the existing policies to review and maintain the quality of Wear OS apps. The overall Wear OS app review process will continue to be mandatory and remains unchanged.

Alongside the above policy changes, all Wear OS apps must target Android 11 (API level 30). Apps that target lower levels will stop being discoverable to all Google Play users whose devices run Android OS versions newer than the app’s target API level from August 31, 2023. This is to ensure that the app is built to meet the safety and quality standard that users expect from newer Wear OS versions.

The following list highlights examples of upcoming quality changes. See a comprehensive list of review criteria here:

  • Black Background – Use a black background for all apps and tiles.
images of watch faces side by side showing Do: Use black Background on the left and Don't use any other color for background on right
  • Ongoing Activity – When a user has an ongoing activity, you must do the following:
    • Show the ongoing activity indicator on the watch face.
    • Update recent apps with the appropriate app launcher chip for the ongoing activity.
    • Reference the ongoing activity from the tile, if the tile is present in the user’s tile carousel.

    Images of two watch faces displaying ongoing activity indicator at the bottom of the watch face on the left and Ongoing activity on an app launcher chip in recent apps on the right
  • Show Time – Display the time of day clearly at the top of the app home screen and any ongoing activity screens. We recommend that you display the time of day at the top of all activities except dialogs and confirmation screens.
    Images of two watch faces with showing time display at the top of the app on the left and Don’t display the time in a dialog, confirmation screen, or picker on the right
These quality updates span visual experience, functionality, performance, and Google Play listings; they are designed to help you provide a consistent, intuitive and enjoyable experience for Wear OS users. With careful consideration of app design, optimal functional behavior, and Google Play experiences, we are aiming to improve app quality and discoverability of quality apps across the Wear OS ecosystem.

As you design and develop, keep in mind the following recommendations to ensure a modern, successful, and discoverable app:
  • Build a modern app that targets API Level 30.
  • Test your app on devices running Wear OS 3 and above to make sure it works well on the latest Wear OS versions.
  • Consider the new Wear OS quality requirements early when designing and developing your app to create quality experience.

Thank you for your continued support of Wear OS by Google. We look forward to seeing what you create.

Now’s the time to learn Android development with Jetpack Compose!

Posted by Murat Yener, Developer Relations Engineer

We are thrilled to announce that the full Android Basics with Compose course is now available. Whether you're a beginner with no programming experience, or a developer looking to learn Jetpack Compose and brush up on their Android development skills, it's a great time to start learning.

This course is designed to teach you how to create Android apps using Jetpack Compose, Android's recommended modern toolkit that simplifies and accelerates Android UI development. Along the way, you'll explore fundamentals of the Kotlin programming language, Android app architecture, and commonly used Jetpack libraries. We also include a unit on Views-Compose interoperability so you can apply your Compose skills when you are working on an existing app built with the legacy View-based UI toolkit.

Android Basics with Compose is divided into 8 units, each covering a different aspect of Compose and Android development. Some of the topics covered are:

  • Fundamentals of the Kotlin programming language
  • Building basic user interfaces with Compose
  • Working with data and state in Compose
  • Using navigation to build apps with multiple screens
  • Persisting data using Room and DataStore
  • Fetching remote data and images
  • Scheduling tasks with WorkManager
  • Using Compose and Views side-by-side in the same app

Each unit is packed with hands-on exercises, quizzes, and open-ended projects to help you solidify your understanding of the content.

Image of five phone screens side by side displaying different modules in Android Basics with Compose

You'll learn how to test what you built and use Android Studio tools to further debug and troubleshoot your app. Plus you will earn badges to showcase your achievement in your Google Developer Profile!

Image of 17 different badges that can be earned to showcase your acheivement in your Google Developer Profile

Compared with our previous training course, Android Basics in Kotlin, we have expanded our coverage of Kotlin language basics. We used the same app concepts as in the older course so you can compare the same app built with Compose and legacy Views side-by-side.

Image if two phone screens side by side showing the 'unscramble the word' concept being used in Android Basics in Kotlin course (left) and in Jetpack Compose for Android Developers (right)

If you are already familiar with developing Android apps with Kotlin and are only looking to learn Compose, you may also want to check out the Jetpack Compose for Android Developers course.

The Android Basics with Compose course is available online and self-paced, making it easy for you to learn at your own pace and on your own schedule. This course provides up-to-date information and guidance on each topic, and all apps are updated with our latest architectural best practices.

We hope you enjoy the course and find it valuable in your journey as an Android developer. Happy coding, and please share what you've built on social media, using #AndroidBasics!

How Stripe leveraged Google Play to build an SDK for Tap to Pay on Android

Posted by the Stripe and Android teams

What is Stripe Terminal and what does it offer Android developers?

Stripe Terminal is a set of tools for accepting in-person payments, including developer

interfaces, card readers, and logistics management. Android developers can build in-person commerce experiences with the Terminal Android SDK and the Tap to Pay on Android SDK. The Terminal Android SDK allows users to go to market with Stripe’s pre-certified card readers, and the Tap to Pay on Android SDK enables merchants to accept contactless payments on their existing compatible Android devices. The Tap to Pay on Android SDK eliminates the need for additional hardware, allowing POS providers and their users to quickly scale, increase revenue, and reach new markets. Both SDKs integrate seamlessly with the Stripe platform, so businesses can manage online and in-person payments in one place. Existing Terminal users have integrated Tap to Pay on Android with the Stripe Terminal SDK in just a couple of weeks.

Moving image of a transaction being completed on an Android device with Tap to Pay on Android SDK

Stripe has used Google Play SDK Console since the product’s launch in 2020 to monitor the performance of our SDKs, including the Terminal Android SDK and Android SDK for online payments. Google Play SDK Console is a platform for widely-used commercial SDKs to share important updates with developers—such as critical issues related to recent releases—and provide precise mitigation instructions for out-of-date SDK versions. Features of Google Play SDK Console such as usage statistics, crash reporting, and version reporting make it possible for SDK providers such as Stripe to streamline communication with customers and help keep a pulse on the health of their SDKs.

How have Google Play features shaped the development of the Tap to Pay on Android SDK?

Security was key to the development of the Tap to Pay on Android SDK due to the need to secure sensitive card data for the acceptance of contactless payments on a broad range of consumer devices. We originally incorporated the SafetyNet Attestation API into our broader security strategy for Terminal to address the need for device attestation. Looking ahead to 2023, we plan to use the new Play Integrity API, which replaced SafetyNet Attestation and offers device attestation and other integrity services. The Play Integrity API will also help us meet the recently published PCI MPoC (Mobile Payments on COTS) standard for mobile payment acceptance solutions. This standard requires Stripe to verify that Android applications using the Tap to Pay on Android SDK are unmodified, and that those applications have been installed from a trusted source like the Google Play Store. The Play Integrity API will not only help us meet industry standards, but will also mitigate the risk that a compromised device or application could be used to collect payments, which protects Stripe users and upholds the security of payments made using the Tap to Pay on Android SDK.

ALT TEXT

In addition to security, ubiquity across Android devices has also been a driving force in the development of the Tap to Pay on Android SDK. A fundamental goal for Stripe was to build a solution that would work on a wide range of consumer and enterprise Android devices. The decision to use the Play Integrity API was therefore also largely influenced by the appeal of Google Mobile Services and the wide range of functionality afforded by its associated APIs and applications.

What is Stripe planning next for the Tap to Pay on Android SDK?

We’re excited to partner with Google as an early adopter of the Play Integrity API for SDKs. This will allow the Stripe SDK to access the Play Integrity API with an API key, streamlining the experience for developers using the SDK as they won’t have to separately integrate with the Integrity API. Google plans to offer this to more SDKs in 2023.

Where can I learn more about Stripe’s Tap to Pay on Android SDK?

Visit our Tap to Pay page for more information. Tap to Pay on Android is currently available through the Stripe Terminal Android SDK in the US, Canada, the UK, Singapore, Australia, and New Zealand. Reach out here to start building.

Feature Engineering in the Google Play Store

Posted by Harini Chandrasekharan, Staff Software Engineer, Google Play

The Google Play Store, launched 10 years ago in 2012 sits at the heart of Android, connecting billions of users with an equally staggering and ever-growing collection of apps and games worldwide.

Let's take a peek behind the curtains to learn what it takes to design the serving infrastructure of the worlds largest Android marketplace. In the world of consumer facing software, it's not a surprise that out of box engineering solutions fail to meet the requirements that Google scale demands. Therefore every system at Google is carefully crafted and honed with iterative enhancements to meet the unique availability, quality and latency demands of the Google Play Store.

What is feature engineering?

Features can be user-facing such as formats, content, arrangement of content, the page layout or information architecture. Formats represent how app content from our recommendation systems, advertisers, merchandisers and various other sources are presented on UI. The goal is to create tailor-made experiences weaving in the right content and UI to suggest the most relevant apps and games to meet the users where they are in their journey on the play store.

In the domain of consumer facing features, users’ opinions and choices, developer ecosystem and demand often changes faster than infrastructure can. In such an environment, the biggest challenge engineers face is how to be nimble and design infrastructure that’s not only future-proof but also meets the needs of the consumer space within the constraints of scalability and performance. Let’s take a deeper look at some engineering challenges in such a dynamic space.


What does success look like?

In a data driven organization such as the Play store, metrics are built for measuring anything and everything of importance. Here are some of the dimensions that come in handy when measuring and tracking success:

  • Product/business metrics - These are metrics specific to the product or service under consideration. Running A/B experiments to measure changes to these metrics for the new treatment builds confidence, particularly when decision making involves several tradeoffs.
  • Performance - Measuring latency, error rates and availability makes the backbone of almost every service and for good reason. Knowing these baseline metrics is essential since this closely tracks user experience and perception of the product.
  • System health - These are internal system metrics tracking resource utilization and fleet stability.

Challenges in feature engineering infrastructure

Designing backend systems that scale to the requirements of the Play Store that also meet the performance criteria required to make user interactions feel fluid and responsive is paramount. From an engineering perspective, infrastructure needs to continuously evolve to meet the needs of the business. The Play store is no different—the store infrastructure has evolved several times in the last decade to not only support the needs of new features that are available to users today, but also to modernize, eliminate tech debt and most of all reduce latency.


Frequent iteration

Challenge: Features often require large amounts of iteration over time, it's hard to plan engineering infrastructure that meets all the future requirements.

In an experiment driven culture, the optimum approach for rapidly building features at scale often results in tech debt. Tech debt has various forms—relics of past features that did not make it result in layers that are hard to clean up, affect performance, make code error prone and hard to test.

Independent evolution

Challenge: In large organizations spanning 100s of engineers, several features are often being built in parallel and independent of each other.

Infrastructure reuse and sharing innovations are often impossible without significantly compromising on velocity. In a space where the product evolves at a rapid pace there is often a large amount of uncertainty with the different levers and knobs one can build into systems to make them flexible. Too many levers can lead to large system complexity. Too few levers and the cost of iteration is sky high. Finding the balance between the two is one of the core competencies of a feature engineer in this space.

Time to experiment

Challenge: There is often an opportunity cost to pay for time spent building elegant engineering solutions.

Time to experiment is one of the most important metrics to keep in mind when designing solutions for user facing features. Flexible design that enables rapid iteration and meets the latency and other performance SLOs is ideal.

In practice, there is often a large amount of guesswork that goes into estimating impact of a particular user facing change, while we can use past data and learnings confidently to estimate in some scenarios, it's not sufficient for a brand new ambitious, never before tried idea.


Feature engineering guiding principles

Let’s see how the Play Store solves these challenges to enable state of the art innovation.

Data driven experiments and launches - understand your success metrics

Optimizing for time to market i.e getting the feature to the user and measuring how it impacts app installs and other store business metrics using A/B experiments is of prime importance. Iterating fast based on data helps tune the final feature to the desired end state. Google has several home grown technologies for running A/B experiments at worldwide scale with seamless integration with metric presentation tools that make running these experiments smooth and easy, so developers can spend more time coding and less in analysis.

Design and experiment with polished MVPs - with a focus on quality

Deciding what to build, whether it meets Google quality standards, understanding engineering costs and the user needs it solves are all important questions that need to be answered before designing anything. Feature Engineering is therefore often done in close collaboration with Product Managers. Aligning on the perfect MVP that can be built in a reasonable amount of engineering time that meets the user journey is the key to a successful product.

Frequently modernize the infrastructure - clean up tech debt

Frequent iterations and a fast MVP development culture often comes with its set of cons, the biggest being tech debt. In optimizing for fast velocity, cutting corners results in obsolete code (due to unlaunchable metrics) or discarded experiment flags. These often make testing, maintaining and impact future development velocity if left unfixed. Additionally, using the latest and greatest frameworks to get to the last milliseconds of latency or making development easier yields great dividends in the long run. Frequently modernizing the infrastructure either via refactoring or full rewrites may traditionally spell signs of poorly designed code, but it's one of the bigger tradeoffs that feature engineers often have to make, because after all what use is all the fancy infrastructure if users don't interact with the feature in the first place!


How useful did you find this blog post?

API desugaring supporting Android 13 and java.nio

Posted by Clément Béra, Software engineer

We are happy to announce the release of a new version of API desugaring based on Android 13 and Java 11 language APIs. API desugaring allows developers to use more APIs without requiring a minimum API level for your app. This reduces friction during development. You are now free to use the java.nio APIs no matter which Android version is on the user’s device. For example, libraries such as kotlin.io.path are now available on all Android devices, including devices running Android 7 and lower.

In addition to supporting java.nio, API desugaring of java.time and java.util.stream has been updated to support APIs added up to Android 13. You can use recent APIs in your Android app such as Collectors#toUnmodifiableList.

New API desugaring specifications

To enable API desugaring, you set isCoreLibraryDesugaringEnabled and add the coreLibraryDesugaring dependency in the build.gradle.kts file.

android { ... compileSdk = 33 defaultConfig { ... // Required when setting minSdkVersion to 20 or lower. multiDexEnabled = true ... } ... compileOptions { // Flag to enable support for API desugaring. isCoreLibraryDesugaringEnabled = true // Sets Java compatibility to Java 8 sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" } } dependencies { // Dependency required for API desugaring. coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.0.2") }

The new version 2.0 release comes in 3 flavors:

  • com.android.tools:desugar_jdk_libs_nio:2.0.2 - the nio version includes all the desugaring available including the java.nio, java.time, stream, and functions APIs.
  • com.android.tools:desugar_jdk_libs:2.0.2 - the default version includes desugaring for the java.time, stream, and functions APIs. It’s similar to version 1.x API desugaring already available, but updated with APIs added up to Android 13.
  • com.android.tools:desugar_jdk_libs_minimal:2.0.2 - the minimal version includes only the java.util.function package and bug fixes on concurrent collections. It’s designed for minimal code size overhead.

Opting into more desugaring features will lead to a larger impact on your app’s code size. The minimal specification has, as its name indicates, a minimal impact on the code size of the app. The nio specification has the most impact.

The new java.nio APIs

The new java.nio APIs supported in API desugaring include:

  • All the classes and APIs in java.nio.file such as BasicFileAttributes, file manipulation, or usage of java.nio.file.Path.
  • Some extensions of java.nio.channels, such as the FileChannel#open methods.
  • A few utility methods such as File#toPath.

The following code snippet illustrates how you can now use the new java.nio APIs on all devices, including devices running Android 7 and lower, through the methods of kotlin.io.path which depend on java.nio.file.Files. A temp file can be created, written into, read, and its basic attributes and its existence can be queried using the new java.nio APIs.

import android.util.Log import java.nio.file.StandardOpenOption.APPEND import kotlin.io.path.createTempDirectory import kotlin.io.path.deleteIfExists import kotlin.io.path.exists import kotlin.io.path.fileSize import kotlin.io.path.readLines import kotlin.io.path.writeLines ... val TAG = "java.nio Test" val tempDirectory = createTempDirectory("tempFile") val tempFile = tempDirectory.resolve("tempFile") tempFile.writeLines(listOf("first")) tempFile.writeLines(listOf("second"), options = arrayOf(APPEND)) Log.d(TAG,"Content: ${tempFile.readLines()}") Log.d(TAG,"Size: ${tempFile.fileSize()}") Log.d(TAG,"Exists (before deletion): ${tempFile.exists()}") tempFile.deleteIfExists() Log.d(TAG,"Exists (after deletion): ${tempFile.exists()}")

// Resulting logcat output. Content: first second Size: 13 Exists (before deletion): true Exists (after deletion): false

A few features however cannot be emulated for devices running Android 7 and lower and instead throw an instance of UnsupportedOperationException or return null. They still work on devices running Android 8 or higher, so existing code guarded by an API level check should work as it used to. See the complete list of APIs available and the known limitations.

The code has been extensively tested, but we are looking for additional inputs from app developers.

Please try out the new version of API desugaring, and let us know how it worked for you!

For additional background see the post Support for newer Java language APIs from when API desugaring was introduced.

Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Enable next generation IDs for better Play Games Services support for all Google accounts

Posted by Laura Nechita, Software Engineering at Google Play and Victor Chen, Product Specialist at Google Play

To further enhance the privacy of users and their multi-platform gaming experience, Play Games Services (PGS) is introducing next generation Player IDs. With this change, the first time a user plays a game, they will always be assigned a unique next generation Player ID that will remain consistent regardless of the device or platform a user plays a game on, but which will vary from game to game.

Existing users, or accounts that have already signed into your game using PGS retain their current PGS Player IDs and are not affected by this change. If you have multiple titles in your portfolio and need a way to identify users across your titles to offer cross-game user experiences, we are also introducing a developer player key. Learn more.

With next generation IDs, it will also enable better Play Games Services support for all accounts, including those under supervision.

Here is a timeline for the rollout:

Feb 16, 2023
  • You can start testing next generation IDs using PGS test accounts
  • You can publish this feature once you have completed your testing
Apr 15, 2023

  • Next generation IDs are enabled in draft mode for newly created game projects
  • You can disable next generation IDs on the game properties page in Google Play Console
Feb 2024

  • Next generation IDs will be turned on in production for all game projects (including existing game projects)
  • If you notice any issues during this period you will have one month to disable next generation IDs and fix the issue
Mar 2024

  • Next generation IDs are required for all game projects and cannot be disabled

How this affects your game

  • Next generation IDs are only assigned to users signing in to PGS on your game for the first time.
  • Users who have already signed in to PGS on your game are not affected.
  • We are introducing a new developer player key which allows you to identify users across games in your portfolio.