Posted by Christiaan Prins, Product Manager, ML Kit and Shiyu Hu, Tech Lead Manager, ML Kit
Two years ago at I/O 2018 we introduced ML Kit, making it easier for mobile developers to integrate machine learning into your apps. Today, more than 25,000 applications on Android and iOS make use of ML Kit’s features. Now, we are introducing some changes that will make it even easier to use ML Kit. In addition, we have a new feature and a set of improvements we’d like to discuss.
ML Kit's APIs are built to help you tackle common challenges in the Vision and Natural Language domains. We make it easy to recognize text, scan barcodes, track and classify objects in real-time, do translation of text, and more.
The original version of ML Kit was tightly integrated with Firebase, and we heard from many of you that you wanted more flexibility when implementing it in your apps. As a result, we are now making all the on-device APIs available in a new standalone ML Kit SDK that no longer requires a Firebase project. You can still use both ML Kit and Firebase to get the best of both products if you choose to.
With this change, ML Kit is now fully focused on on-device machine learning, giving you access to the unique benefits that on-device versus cloud ML offers:
Naturally, you still get access to Google’s on-device models and processing pipelines, all accessible through easy-to-use APIs, and offered at no cost.
All ML Kit resources can now be found on our new website where we made it a lot easier to access sample apps, API reference docs and our community channels that are there to help you if you have questions.
If you are using ML Kit for Firebase’s on-device APIs in your app today, we recommend you to migrate to the new standalone ML Kit SDK to benefit from new features and updates. For more information and step-by-step instructions to update your app, please follow our Migration guide. The cloud-based APIs, model deployment and AutoML Vision Edge remain available through Firebase Machine Learning.
Apart from making ML Kit easier to use, developers also asked if we can ship ML Kit through Google Play Services resulting in a smaller app footprint and the model can be reused between apps. Apart from Barcode scanning and Text recognition, we have now added Face detection / contour (model size: 20MB) to the list of APIs that support this functionality.
// Face detection / Face contour model // Delivered via Google Play Services outside your app's APK… implementation 'com.google.android.gms:play-services-mlkit-face-detection:16.0.0' // …or bundled with your app's APK implementation 'com.google.mlkit:face-detection:16.0.0'
Android Jetpack Lifecycle support has been added to all APIs. Developers can use addObserver to automatically manage teardown of ML Kit APIs as the app goes through screen rotation or closure by the user / system. This makes CameraX integration easier. With this release, we are also recommending that developers adopt CameraX in their apps due to the ease of integration and image quality improvements (compared to Camera1) on a wide range of devices.
// ML Kit now supports Lifecycle val recognizer = TextRecognizer.newInstance() lifecycle.addObserver(recognizer) // ... // Just like CameraX val camera = cameraProvider.bindToLifecycle( /* lifecycleOwner= */this, cameraSelector, previewUseCase, analysisUseCase)
For an overview of all recent changes, check out the release notes for the new SDK.
To help you get started with the new ML Kit and its support for CameraX, we have created this code lab to Recognize, Identify Language and Translate text. If you have any questions regarding this code lab, please raise them at StackOverflow and tag it with [google-mlkit]. Our team will monitor this.
Through our early access program, developers have an opportunity to partner with the ML Kit team and get access to upcoming features. Two new APIs are now available as part of this program:
If you are interested, head over to our early access page for details.
ML Kit's turn-key solutions are built to help you take common challenges. However, if you needed to have a more tailored solution, one that required custom models, you typically needed to build an implementation from scratch. To help, we are now providing the option to swap out the default Google models with a custom TensorFlow Lite model. We’re starting with the Image Labeling and Object Detection and Tracking APIs, that now support custom image classification models.
Tomorrow, we will dive a bit deeper into how to find or train a TensorFlow Lite model and use it either with ML Kit, or with Android Studio’s new ML binding functionality.
Subscription continues to be one of the fastest growing business models for apps in Google Play. As your subscription business evolves and becomes more sophisticated, our platform continues to evolve to better support your needs. Today we’re excited to tell you more about the new subscription capabilities we announced at the Android 11 Beta Launch, including promotional codes to help you access new subscribers, new opportunities to remind users of your value and win back churned users. Many of these capabilities are built on top of the Play Billing Library version 3.
In addition to the new capabilities, we are also making improvements to our existing platform. Over the past few years, we have launched many features, such as account hold, restore, and pause, which have been highly effective in reducing your voluntary and involuntary churn. We want to ensure that everyone can take advantage of them, which is why we are planning on changing the default settings for these features from optional to either mandatory or on by default starting on November 1, 2020. Additional details on these features and implementation requirements can be found at the end of this post.
Here’s everything that is changing about the subscriptions platform:
Last year at I/O 2019, we launched subscription one-time promotion codes, unique alphanumeric codes that can be distributed to individual users for redemption. Now, we have launched a new frictionless redemption flow which allows users to easily redeem the code, purchase the subscription, and install the app in the Play store in a few simple steps. This greatly simplifies the user experience by reducing the friction users go through to use your code. Since this subscription is started outside of your app, it is only available to developers who are using Billing Library 2.0 or higher.
Finally, we’ve heard your feedback that requiring users to opt in to subscription price decreases was too restrictive. We are happy to announce that subscription price decreases will no longer require users to take action to opt in to keep their subscription. Users will be notified of an upcoming price decrease and be able to see the upcoming change in the Google Play subscriptions center.
Over the past few years, our platform has made strides in helping you keep your subscribers, through features aimed at decreasing both voluntary churn and involuntary churn (churn due to payment failure). For example, account hold has helped developers achieve 8% lower involuntary churn and 35% higher payment decline recovery rate compared to developers without account hold. Although these features are effective, retention may not be something that you are thinking about when starting out for the first time.
That’s why we are announcing updated defaults for several subscriptions features that have been up until now optional, which will take effect on November 1, 2020.
You may have to make modifications to your app or your server to handle these new features. Specifically, your app should:
Although not every feature will require you to make engineering changes, we highly recommend that you test each feature before November 1. To make the transition easier, Google has enabled Account Hold, Pause, Restore, and Resubscribe for all license test accounts. Learn more about testing for subscriptions.
How useful did you find this blog post?
★ ★ ★ ★ ★
Posted by Jacob Lehrbaum, Director of Developer Relations, Android
Developers like you have always played an important role in Android innovation. Over 10 years ago, when we first launched the Android SDK, we also announced the Android Developer Challenge to reward model apps and highlight new ways of solving user problems. As Android pushes the boundaries of machine learning, 5G, foldables, and more, developers continue to help shape these new frontiers. To celebrate this work, we revived the challenge in 2019, with a focus on “Helpful Innovation,” powered by on-device machine learning.
We received hundreds of creative projects, and at the end of last year, picked 10 winners who each combined a strong idea and a thirst to bring it to life. Since then, we’ve been working with those winners to help turn their ideas into reality. And today, we’re announcing the 10 winners. Some are still at the beginning of their journey but but their apps are now ready for you to download and try out! !
Increasingly, machine learning is becoming a more accessible tool to developers with limited to no background in the technology. In fact, for most of the winners of the Android Developer Challenge, this was their first foray into machine learning. That’s thanks in part to two key offerings from Google, which bring on-device machine learning into reach for millions of developers around the world.
The first is ML Kit. ML Kit brings Google’s on-device machine learning technologies to mobile app developers, so they can build customized and interactive experiences into their apps. This includes tools such as language translation, text recognition, object detection and more. Eskke, for instance, uses offline text recognition and barcode scanning from ML Kit so users can scan the QR code at a mobile money kiosk and quickly withdraw money. And MixPose uses ML Kit's forthcoming Pose detection API to detect each user’s yoga positions and movements, so teachers can provide feedback.
The other Google resource that many of the Android Dev Challenge winners used was TensorFlow Lite. This powerful machine learning framework can help run machine learning models on Android, iOS and IoT devices that would never normally be able to support them. Its set of tools can be used for all kinds of powerful neural network-related applications, from image detection to speech recognition, bringing the latest cutting-edge technology to the devices we carry around with us wherever we go. Trashly, for instance, uses a custom TensorFlow Lite model to report if an object is recyclable and how to recycle it.
Helpful innovation, such as the 10 winning apps in the Android Developer Challenge, has the potential to change the way we access, use, and interpret information, making it available when we need it, where we need it most. By working with these developers focused on helpful innovation, we hope to inspire the next wave of developers to unlock what’s possible with this new technology.
As we kick off the second week of #11WeeksOfAndroid, focused on Machine Learning, we will highlight new tools and resources available to Android developers. Here’s a taste of the rest of this week:
On Tuesday and Wednesday, we will also have a “codelab of the day” so get your Android Studio 4.1 beta today, block off an hour in your schedule and take this ML journey with us!
*The apps presented here are the projects of the developers individually, and not Google.
Posted by Dr. Stefan Frank, Senior Product Manager, Android System UI
This blog post is part of a weekly series for #11WeeksOfAndroid. Each week we’re diving into a key area of Android so you don’t miss anything. This week, we spotlight people & identity. Here's a look at what you should know.
One of the goals of Android 11 was making our phones more people-centric. Because nothing matters more to people than connecting to loved ones. It is a core human need especially during our current physical distancing constraints. We have the need to be more social than ever before. Android 11 reimagines how we have conversations on our phones by adding new capabilities to help you maintain your identity across multiple devices.
We are announcing some new features in Android 11 that allows you to easily connect with your loved ones, friends and business colleagues. At the center of this release is the Android Conversation Shortcut API and Identity Services Library. These new tools empower instant connections to your best friend, sharing funny pictures of your dogs, telling your aunt about a tasty seafood recipe that you discovered, or congratulating an office colleague about her promotion. And they also provide a new level of password management that makes it easier for your users to sign up and sign in.
One of our favorite features brings conversations from people that matter most to you right to the lock screen of your phone. You’ll easily recognize them by their avatar and instantly respond to your family, friends, or colleagues. These are people you truly want to connect to. We knew this feature would be useful, but the responses from our beta-testers made us smile. The decision to include the Conversation Shortcut API to improve the lives of our users was one of the easiest decisions for us to make in the release of Android 11.
Creating a bubble from an incoming notification and accessing the conversation from the bubble.
One of the new features building on top of shortcuts is the new conversation space at the top of your notifications. It focuses your attention on what matters most - your conversations. Right from these notifications the user can trigger another new feature in Android 11 - Bubbles. Bubbles are small representations of conversations floating over other content on the side of the screen, which can be expanded to allow quick access to conversations, without changing what you were doing on the device. They are super handy for carrying on conversations while using the device for other tasks.
The new conversations space showing how a conversation is marked as priority and will be displayed on the lock screen.
A long tap on conversation notifications enables the user to mark priority conversations in order to give special prominence to the most important people. Priority conversations will be displayed with their individual avatar right on the lock screen and move to the top of your notifications. They can even be set to break through do-not-disturb. Another use of the conversation shortcuts is that they are used as share targets in the system share sheet, which was already launched in Android 10.
Another focus of this week was identity. To tackle user and developer complexity that makes identity a challenge for developers, we've been working on One Tap and Block Store, part of our new Google Identity Services Library. One Tap is our new cross-platform sign-in mechanism for Web and Android, supporting and streamlining multiple types of credentials. Block Store is our new token-based sign-in mechanism that’s built on top of Backup and Restore. It allows you to keep your user signed in across Android devices.
We’re super excited about all these features [since] they help all of us connect, communicate and express ourselves to the people that we care about and to the apps we are dealing with -- which is as important now as it’s ever been.”
For a high level overview of the people centric functionality, we recommend that you check out the Android 11 launch highlight video on People. Earlier this week, we also launched a new talk on ‘Conversation Notifications’, where Artur describes how to implement the conversation shortcut and bubbles. There is also a great overview talk on the conversation additions and other System UI news from Dan. Finally, you can also listen to Chet’s podcasts where he interviews us on People and Bubbles.
If you’re interested in learning more about Identity, we also published “In Identity on Android: What’s new in sign-in”, this week. In this video, Vishal explains the new libraries in the Google Identity System: One Tap and Block Store."
Two of the teams that worked very early with us on these conversation specific topics are the Messenger team from Facebook and the direct messaging team from Twitter. Read the stories around both of these implementations here and here.
If you’re looking for an easy way to pick up the highlights of this week, check out the People and Identity pathway. A pathway is an ordered tutorial that allows users to complete a pre-defined module that culminates in a quiz. It may include codelabs, videos, articles and blog posts. A virtual badge is awarded to each user who passes the quiz. Test your knowledge of key takeaways about People and Identity to earn a limited edition badge.
Android 11 is the starting point of an ongoing focus on what matters most to users, people and conversations. Many of our partners in our ecosystem introduced amazing apps and services enabling these connections with people and conversations. We in Android want to elevate and surface these partners more prominently in order to support this goal. Thus if you are working on an app that fosters real time communication between people, we strongly encourage you to adopt the conversation shortcut based APIs for notifications, bubbles and sharing when targeting API 30 in order to put users’ conversations front and center and give them quick access to your app. The developer documentation can be found here.
For apps that handle user accounts, we encourage you to help our users avoid messy password hunting and forgotten credential processes by integrating One Tap to streamline credential management and Block Store to handle device updates. These integrations will work on phones back to Android M.
In the spirit of this week, I wish you meaningful and joyful connections with the people that matter to you and seamless experiences with your favorite apps. We hope you will help us in our journey of supporting these goals.
You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. We’ll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!
This blogpost is a collaboration between Google and Messenger from Facebook. Authored by Aaron Labiaga with support from Caleb Gomer and Samuel Guirado from Messenger.
Messenger is ubiquitous in the messaging app world and has pioneered the floating chat bubble. Bubbles help users keep conversations in view and accessible while multitasking, overlaying other UI elements in the foreground, and providing users easy access and visibility to their ongoing chats. Bubbles is one way Android 11 is making the platform more people-centric and expressive, reimagining the way we have conversations on our phones. Messenger’s early pioneering of the floating chat bubble, and the strong reception by users, helped lead to its native implementation in the framework.
The Bubbles API is built on top of the notifications API and is exclusively focused on people in Android 11. First Introduced in Android 10, what was previously an opt-in feature is now on by default. To use bubbles, the developer must create BubbleMetadata, which is set on the notification. This metadata describes the Activity to launch when a bubble is clicked, along with various behaviors relevant to the expanded bubble. The Activity must follow the criteria of being embeddable and resizable in order to use it in a bubble.
Notification bubbles are reserved for conversations with persons in context. These are MessagingStyle notifications with a set long-lived shortcut ID. Please see the following Bubbles code sample how.
The Messenger team shares their experience with the migration and prospect of the impact of the changes.
How was the migration to bubbles, technical challenges, scope, and impact on codebase?
Prior to Bubbles, Messenger used the SYSTEM_ALERT_WINDOW for its implementation of Bubbles. It achieved our purpose, but hosting complex Android UI outside of Activities is challenging to implement and maintain. Using this natively supported API allowed us to build more traditional, Activity-based Android UI that works well in Bubbles and full screen. This new Bubbles-based chat experience is much simpler and more maintainable than our SAW-based one. We are excited that Android believes that it is a user experience that will help drive improvements in the conversation space.
Ensuring that bubble shortcuts were up-to-date with the latest state of the conversation thread was a technical challenge worth noting. Picture changed, conversation deleted or contact blocked are events that require the bubble shortcut to be updated or even deleted. The Shortcuts API allows for easily registering/unregistering shortcuts and for querying and updating existing ones, which made this whole process very straight forward.
What are your future prospects on the impact of Messenger messages in the conversation space?
The conversation section will give our messages the right visibility. Given that conversation section ranks high in the notification drawer, we definitely want to be present in that space.
Bubbles are just one way that Android 11 puts people at the heart of the experience for Android; if you’re a messaging or chat app, you should consider using the Bubbles API to help your users as they multi-task. It’s great to see apps like Messenger navigate the openness of Android to create innovative new experiences, and we’re excited to make Bubbles a native experience in Android 11. For more information, please visit the Conversation API guidelines.
This blogpost is a collaboration between Google and Twitter. Authored by Aaron Labiaga with support from Fred Lohner, Suzanne Xie, and Alex Ackerman-Greenberg from Twitter.
Twitter is a social media app and source for what's happening in the world. And with Android 11’s Conversation APIs, surfacing Twitter’s Direct Messages to the conversation space makes perfect sense as it features real people talking in real time bidirectional conversations.
To surface notifications in the conversation space, developers need to use Messaging style notifications set with a published long-lived shortcut ID. The shortcut ID allows for surfacing the conversation throughout various surfaces in the UI, including as a shortcut in the launcher. For details and sample code on how this is done, please see the conversation API guidelines.
Frederik Lohner, tech lead of Twitter’s notifications team and Suzanne Xie, Product Management Director for Conversations on Twitter, share their experience with the migration and future prospect of its impact:
How was the migration to messaging style notifications, the technical scope and its impact on codebase?
Due to legacy reasons we first had to migrate to use MessagingStyle notifications for our DM pushes. This offered a great opportunity to clean up a bunch of technical debt, whilst allowing us the opportunity to begin testing things like auto generated replies for notifications with very little additional work on our side.
Were there any challenges in the implementation of shortcuts? As it is a requirement for the conversation space.
We found it challenging to manage the max number of published dynamic shortcuts since there is a limited number, requiring us to manually remove older shortcuts as new ones were created. The first Developer Preview didn't include a great way for managing shortcuts but this changed in Developer Preview 2, with the addition of the pushDynamicShortcut method that handled the limit for you.The addition of this method is a testament to the importance of exploring the APIs in the early stages and the impact one can have on shaping the API through testing and feedback.
What do think is the future prospect on the impact of migration, e.g. more engagement given visibility of DMs in conversation space?
We think these changes will make DM's much easier to use and look forward to getting feedback from our users. The conversation space also fits the purpose of DMs and it is important that these messages are categorized in the right space.
Android 11 reimagines the way we have conversations on our phones, building an OS that can recognize and prioritize the most important people in your life. If your application has any notion of messaging between people then consider following the guidelines in the Android developer docs to ensure that you're taking advantage of the new conversation space. We’re excited to work with developers like Twitter to help showcase the importance of a people-centric experience on mobile phones with Android 11.
Posted by Steve Hartford, Product Manager, Google Play
Google Play is committed to a healthy ecosystem, where developers succeed by creating high-quality apps that users love. Many developers realize that success using Google Play’s one-time purchase and subscription services. Over the last decade, we’ve improved the purchase experience for Android users with features like paying via carrier billing (with over 180 supported carriers today), and tools to budget expenses and easily manage subscriptions.
We’re furthering these efforts with the launch of Billing Library version 3. Now available, this newest version includes new ways users can pay, subscription promotion capabilities, purchase attribution for games, and improvements to purchase reliability and security. Starting August 2, 2021, all new apps must use Billing Library version 3 or newer. By November 1, 2021, all updates to existing apps must use Billing Library version 3 or newer.
We continuously work to ensure users worldwide can pay for your one-time purchases and subscriptions in a way that’s comfortable and convenient.
Cash remains the most widely used payment method globally with 2.7 trillion transactions across all goods and services in 2018 (Source: Euromonitor). Last year we previewed a new payment method in which the transaction is completed off-device, such as paying with cash at a local convenience store. According to World Bank, two billion people worldwide do not have access to a bank account, so these pending transactions can help unlock new buyers, especially in emerging markets where cash is a popular form of payment.
Today we’re announcing users can easily pay for one-time purchases with cash in Indonesia and Malaysia at over 50,000 locations, including at leading retailers such as 7-Eleven and Alfamart. Pending transactions will be available soon for all developers.
Cash Purchases using Billing Library 3
Billing Library version 3 unlocks the ability for users to discover and purchase items outside of your app, such as across the Play store. One example is the new frictionless subscription promo code redemption experience. Now when you offer promo codes for subscription free trials, users can easily redeem them in the Play store - even if your app isn’t installed yet. It’s a simple redeem, subscribe and install experience that reduces the effort required for users to get going.
Many games and apps need to ensure in-app purchases are attributed to a specific in-game character, avatar, or profile. Billing Library now allows you to specify this information when launching the purchase flow. After the purchase completes, you can retrieve the information and correctly attribute the purchase. This removes the need to build a custom solution using the deprecated AIDL developer payload.
Just like Play’s TargetSDK requirements, it’s important that all users are able to benefit from any security, performance, and user experience improvements in new versions of Billing Library. At Google I/O in 2019, we released Billing Library version 2 and announced changes including a two-year support window for each major release.
This means starting August 2, 2021, all new apps must use Billing Library version 3 or newer. By November 1, 2021, all updates to existing apps must use Billing Library version 3 or newer.
After these dates, you won’t be able to publish apps that use older AIDL, Billing Library version 1 or Billing Library version 2 integrations. Apps already in the Play Store can continue to be downloaded and will process in-app purchases. Any subsequent app upgrades, however, will require Billing Library version 3 or newer.
Billing Library version support
Billing Library version 3 is available today for all game and app developers in Java and Kotlin flavors. For game developers using Unity, we also launched a Billing Library 3-based Unity IAP plugin. This plugin allows Unity developers to meet the Billing Library version requirements and access all Play billing features.
Please upgrade any billing-related SDKs and libraries to versions supporting Billing Library version 3. Reach out to the SDK or library owner if one is not available. We’re working with top providers on their Billing Library version 3 compatibility.
While we recommend upgrading annually, we will be supporting each major release for two years. We recommend developers use Billing Library version 3 today for all new apps, and migrate existing billing integrations as soon as feasible - well ahead of the 2021 deadlines.
For developers who haven’t moved to Billing Library, we realize the transition from AIDL can be non-trivial for existing apps, and we want to help make the move as smooth as possible. We’ve created a migration guide for apps currently using AIDL, and there’s also a video walkthrough.
We’ve also updated our documentation - including guides for purchase attribution, using promo codes, and fighting abuse. Please let us know about any implementation issues - here’s how to contact us.
For details on all the Play Commerce platform improvements, watch our “What’s New” video session.
We’re looking forward to working with you to deliver great purchase experiences in your apps and games.
Posted by Greg Hartrell, Head of Product Management, Games on Android & Google Play
In March of this year, at the Google for Games Developer Summit, we shared several new tools and services Google has been working on to help game developers. They make it easier to see how your Android games are performing, expand your reach to more devices and new audiences, and support your go-to-market with Google Play. From the level of interest shown by game developers and the great feedback provided in our developer previews, we’re excited to share the progress we’ve made on these tools, and more.
Discover more about these updates below, and in addition to these, we’ll be back August 17-21, 2020 with even more information during a full week dedicated to Android gaming products, as part of #11WeeksOfAndroid.
To provide greater insights into your game’s performance and help scale your games to reach a growing player-base across the Android ecosystem, we’ve seen growing success with the adoption of Play’s dynamic delivery of game assets as well as our Integrity Protection Suite. Read on for additional launches and updates.
We’ve completely redesigned the Google Play Console making it easier for you to improve your app’s quality, engage your audience, earn revenue, and more. We’re also continuing to improve the Google Play Store and other services allowing you to better market your game to expanded audiences.
We hope you start using some of these new tools and features, and continue to share your feedback with our development teams. You can learn about all of the offerings we have to help game developers at d.android.com/games.
Android vitals is the destination for managing your app's technical quality. Over 80,000 developers take advantage of its performance and stability metrics every month.
As part of our work to help you deliver better game experiences to more Android users, we're introducing Android Performance Tuner - a new library in the Android Game SDK that unlocks game performance insights in Android Vitals. This gives you a scalable way to measure and optimize your frame rate and graphical fidelity across the whole Android device ecosystem.
Unity Boat Attack Sample with Different Optimizations
Once you have integrated Android Performance Tuner into your game and published it on Play, you'll be able to see how it performs across real users and devices with the following new features in Android vitals.
Frame Rate Performance by Quality Level and Device Model
We chart the frame time distribution across your users’ devices, broken down by quality levels that you have implemented in your game, so you can see how specific device models or hardware specifications are performing on each quality level.
We also analyze your performance data to help determine the likely cause of issues, so you can differentiate between problems associated with specific hardware and problems with specific screens or levels in your game. You annotate your code to give contextual information about what your game is doing at that point. This gives you full control over the granularity of the insights.
Top Device Model/Annotation Issues
We call out the top device model issue as well as the top game-specific issue to give you clear guidance on what's most important.
Underperforming Device Models by GPU
You can drill down to see a breakdown of underperforming device models by different specs, such as GPU and SoC. This allows you to decide whether you can work at the GPU or SoC-level to optimize performance. Alternatively, you may decide to change quality levels, rather than work at the device model level.
Device Model Impact, User Impact, GPU Time
You can also see the full list of device models, along with the number of affected user sessions and frame time, to help you prioritize device-specific changes. As well as total frame time, we also show you GPU time to help determine whether the device is GPU bound or has another performance problem, such as being CPU or I/O bound. All data in the device model table can be exported for further analysis and action planning.
Frame Time Performance with Opportunities
The devices on the far left are more than meeting the frame times for smooth performance. You can drill down to see stats by device model and specification to see if there is an opportunity to improve the graphical fidelity across a wide range of devices.
The Android Performance Tuner is intended to work across over 99% of the Android device ecosystem. You can get these insights on any Android devices around the world, from Android 4.1 (API 16) onwards.
Whether you have your own game engine or are using a third-party game engine, we're doing our best to make integration easy. The Android Performance Tuner relies on tick functions being called each frame. Within the library, this tick information is aggregated into histograms, which are periodically uploaded through an HTTP endpoint, so your game will need to have the internet access permission.
With our plugin for the Unity platform, you can collect frame ticks from Unity 2017.4 onwards. Unity 2019.3.14+ enables the collection of higher-fidelity performance information.
If you're doing a native source code level engine integration, we strongly recommend integrating the Frame Pacing API from the Android Game SDK to get the highest quality information. The Frame Pacing API will give you smoother frame rates and improved support for high-refresh rate displays, so it's worth integrating on its own.
Unreal 4.25+ integrates the Frame Pacing API. You enable it by adding a.UseSwappyForFramePacing=1 to the Android_Default profile to activate it for all Android devices.
a.UseSwappyForFramePacing=1
Within Unreal or your native engine integration, you pass in the Swappy_injectTracer function from the Frame Pacing API at initialization to enable automatic frame time recording.
Swappy_injectTracer
void InitTf(JNIEnv* env, jobject activity) { SwappyGL_init(env, activity); swappy_enabled = SwappyGL_isEnabled(); TFSettings settings {}; if (swappy_enabled) { settings.swappy_tracer_fn = &SwappyGL_injectTracer; } … }
Enabling Frame Time Recording in the Android Performance Tuner for your Engine
In Unity, we recommend activating Optimized Frame Pacing within the Unity settings (Unity 2019.3+ only), but Frame Pacing isn't required in Unity to use the Android Performance Tuner.
Activating Optimized Frame Pacing in Unity 2019.3
Next, you want to define annotations to give contextual information about what your game is doing when a tick is recorded, such as:
If you're using Unity with the Android Performance Tuner plugin, you'll automatically get a scene annotation that maps to the current scene being played. The LoadingState annotation can be easily hooked up to your scripts, and you can define additional annotations within the plugin editor UI.
Annotation Parameters within the Unity Editor from the Android Performance Tuner Plugin
To pass annotation parameters from within your own game engine, you define a protocol buffer message that contains all of these annotations, such as loading state, level or scene, etc.
You also define fidelity parameters and associate them with quality levels that your game reports back. These can be used for anything that you use in your game to reduce the complexity of the scene, such as texture quality, draw distance, particle count, post-processing effects, shadow resolution, etc. In the native integration, you define these parameters using a protocol buffer.
import "tuningfork.proto" message FidelityParams { int32 texture_quality_level = 1; int32 shadow_resolution = 2; float terrain_details_percent = 3; int32 post_processing_effects_level = 4; }
Example FidelityParams Proto Definition for an In-house Engine
Then, you create up to fifteen sets of quality levels as a set of values defined by the FidelityParams message, which allows the Android Performance Tuner to track its metrics against your quality data. You can create both fidelity parameters and quality levels in the Unity editor interface provided by the Android Performance Tuner for Unity plugin.
We've created the Tuning Fork Monitor app to act as a local server and display data from an Android Performance Tuner-enabled app. You can call EnableLocalEndpoint() in the Android Performance Tuner Unity plugin on a development build to enable local testing. In your native integration, you set the endpoint_uri_override in the Android Performance Tuner settings.
EnableLocalEndpoint()
endpoint_uri_override
Once local tests look great, you then enable the Android Performance Parameters API in the Google Cloud Console to test end-to-end.
We're committed to helping you bring the best version of your game to the widest number of users and devices in the Android ecosystem. Android Performance Tuner within the Android Game SDK, the Unity plugin, and Performance Insights within Android Vitals are all available now. You can refer to our documentation for a walk through of the process for native and Unity integrations.
Posted by Stephanie Cuthbertson, Director, Product Management
Editor’s note: The global community of Android developers has always been a powerful force in shaping the direction of the Android platform; each and every voice matters to us. We have cancelled the virtual launch event to allow people to focus on important discussions around racial justice in the United States. Instead, we are releasing the Android 11 Beta today in a much different form, via short-form videos and web pages that you can consume at your own pace when the time is right for you. Millions of developers around the world build their business with Android, and we're releasing the Beta today to continue to support these developers with the latest tools. We humbly thank those who are able to offer their feedback on this release.
Today, we’re unwrapping the Beta release for Android 11 as well as the latest updates for developers from Kotlin coroutines, to progress on the Jetpack Compose toolkit, to faster builds in Android Studio, even a refreshed experience for the Play Console.
You’ve been helping us with feedback on the Android 11 developer previews since February, and today we released the first Beta of Android 11 focused on three key themes: People, Controls, and Privacy.
People: we’re making Android more people-centric and expressive, reimagining the way we have conversations on our phones, and building an OS that can recognize and prioritize the most important people in your life:
Controls: the latest release of Android can now help you can quickly get to all of your smart devices and control them in one space:
Privacy: In Android 11, we’re giving users even more control over sensitive permissions and working to keep devices more secure through faster updates.
Developer friendliness: We want to make it easy for developers to take advantage of the new release, so to make compat testing easier, we’ve:
Android 11 also includes a number of other developer productivity improvements like wireless ADB debugging, ADB incremental for faster installs of large APKs, and more nullability annotations on platform APIs (to catch issues at build time instead of runtime), and more.
The first Beta for Android 11 is available today, with final SDK and NDK APIs and new features to try in your apps. If you have a Pixel 2, 3, 3a, or 4 device, enroll here to get Android 11 Beta updates over-the-air. As always, downloads for Pixel and the Android Emulator are also available. To learn about all of the developer features in Android 11, visit the Android 11 developer site.
Over the past several years, the Android team has been hard at work improving the mobile developer experience, to make you more productive. This includes the Android Studio IDE, a great language (Kotlin!), Jetpack libraries to make common tasks easy, and Android App Bundles to improve app distribution. Today we call this modern Android development - bringing you the best of Android to make you as efficient and productive as possible.
Today, we released new features in Android Studio 4.1 Beta and 4.2 Canary, focused on a number of crucial asks from developers:
Try out the latest: Android Studio 4.1 Beta and Android Studio 4.2 Canary.
Languages and libraries are a major area of investment in modern Android development, with Kotlin’s modern, concise language and Jetpack’s opinionated powerful libraries all focused around making you more productive.
With the rise in Kotlin adoption (with over 70% of top 1000 apps on Google Play now using Kotlin) and so many developers using Kotlin, we can now use it to simplify your experience in new ways. Kotlin coroutines are a language feature of Kotlin which make concurrent calls much easier to write and understand. We’re making coroutines our official recommendation, and we’ve built coroutines support into 3 of the most-used Jetpack libraries -- Lifecycle, WorkManager, and Room -- so you can write even better code.
Kotlin itself also continues to get better with every release, thanks to the awesome team at Jetbrains. Kotlin 1.4 provides faster code completion, more powerful type inference enabled by default, function interfaces, as well as helpful quality of life improvements like mixing named and positioning arguments.
We also continue to push Jetpack forward - a suite of libraries which spans multiple Android releases and is designed to make common mobile development patterns fast and easy. Many of us have long loved Dagger, so we worked with the Dagger team to bring you Hilt, a developer-friendly wrapper on top of Dagger, as a recommended Dependency Injection solution for Android. You’ll find this in alpha ready to try out. We’ve also added a second new library App Startup, to help both app developers and library developers improve app startup time by optimizing initialization of libraries. We have many more updates to existing libraries as well, including a major update to Paging 3, rewritten Kotlin-first with full support for coroutines!
There’s one more thing you need to be super productive — and that’s a powerful UI toolkit to quickly and easily build beautiful UIs on Android, with native access to the platform APIs. That’s why we’re building Jetpack Compose, our new modern UI toolkit that brings your app to life with less code, powerful tools, and intuitive Kotlin APIs.
Today we are launching Jetpack Compose Developer Preview 2, packed with features developers have been asking us for:
We've also added a number of new capabilities to Android Studio 4.2, in close partnership with Jetbrains Kotlin team, to help you build apps with Compose:
Compose isn’t ready for production use yet, in particular as we finish performance optimizations, but we’d love you to give it a try and share feedback. We plan to launch Alpha this summer and 1.0 next year.
Google Play is focused on helping developers grow their business. With that mission in mind, we've redesigned the Google Play Console to help you maximize your success on our platform. In addition to being clearer and easier to use, we've added features to help you:
Learn more about the new Google Play Console in this post or join the beta now at play.google.com/console. Your feedback helps us continue to improve Google Play Console for everyone, so please let us know what you think.
But there’s so much more we’re launching that we didn’t get to talk about!