Author Archives: Android Developers

Leading Health and Fitness Apps Roll Out Health Connect Integrations

Posted by Sara Hamilton, Developer RelationsEarlier this year, we introduced Health Connect as a way for app developers like you to have early access to a platform that securely shares health and fitness data across Android devices, with user consent. We collaborated with Samsung to build this platform which simplifies the connectivity between your apps while providing centralized privacy controls for users. We are now making the Health Connect (Beta) app available for download in Google Play to give users a central place to manage their privacy settings with granular controls to see which apps have access to data at any given time.

Today, 10+ health, fitness and wellness apps are rolling out integrations with the platform including early adopters of Health Connect like MyFitnessPal, Oura and Peloton.
Against a light blue background, an illustration of a person and their dog looking at a large screen with a 3x3 display of health app icons: Lifesum, Fitbit, MyFitnessPal, Dexcom, Samsung Health, Oura, Peloton, Flo,and WW.
Through the first wave of integrations, we have seen Health Connect provide many key benefits to developers.


Reduced fragmentation makes it easier to give users more holistic health insights

By enabling health and fitness apps to talk to each other, each app is able to provide a user with better, more holistic health insights.

In the past, developers had to establish multiple API connections to share data between different apps and each integration was costly to build and maintain. This limited developers’ data sharing capabilities and made it hard for users to unlock this data so that it could be utilized in different apps.

Now, with Health Connect, building an integration with a new app is as simple as reading in new data from Health Connect, rather than building a whole new integration.

For example, Android users will now be able to sync and get credit for their Peloton workouts in apps like Oura, MyFitnessPal, WeightWatchers and Lifesum. Now, through a single integration with Health Connect, Peloton Members will have the option to share their workout stats across the ecosystem of apps they use to support their overall wellness.

Phone screen showing App permissions for all apps that can access data stored in Health Connect

Standardized data schema ensures data consistency between apps

Health Connect provides a standardized data schema which supports 40+ data types across 6 categories. The schema is intuitive to use and covers a wide range of use cases, from exercises to sleep tracking to vital signs. It only requires just a few lines of code to read and write any of these data types in Health Connect. Health Connect even supports complex aggregations so that you can completely customize your queries to your app’s use case.

"With Health Connect APIs, our engineers were able to easily adapt their existing architecture in order to read and write user health data such as nutrition, hydration, exercise, and steps. With this integration, we're now able to consume data from any 3rd party application that also writes to Health Connect, expanding our users' choices while allowing them more flexibility to grant granular permissions about which data they want to share"
– Jason Peterson, Chief Technology Officer of MyFitnessPal


Centralize privacy controls for users, with less code

Previously, users had to navigate to multiple apps to manage data permissions. And, developers had to build out permissions management UIs themselves.

With Health Connect, users can easily manage permissions in a single place, with granular controls to see which apps are accessing data at any given time.

For developers, Health Connect provides the permissions management hub and granular permissions UIs out of the box, so you can set this up quickly.

Phone screen showing granular permissions for Run Tracker app to access in Health Connect
granular permissions screen that shows the different data types

For example, Signos was able to quickly set up permissions checks with Health Connect. “One aspect I was pleasantly surprised by was the user onboarding UX,” said Signos developer Jake Smith. “A simple, drop-in piece of code sets up the permissions so users can start reaping the benefits.”


We’re just getting started

Join the many developers who have already integrated with Health Connect and don’t miss out on the opportunity to develop richer insights for your users. Check out our documentation, helpful video tutorials, and code samples – and start building today!

Coming up next for Android Dev Summit ‘22: The Platform track, on November 14!

Posted by Daniel Galpin (@dagalpin), Developer Relations Engineer On Monday, November 14, we kick off the final of three tracks for Android Dev Summit with the Platform track! This track includes almost 20 talks focused on developer features and guidance around Android 13, and how, together with your help, we're making the platform more private and secure, more personal, and more capable than ever. We dropped information on the livestream agenda, technical talks, and speakers — so start planning your schedule!
Platform Track @ Android Dev Summit
November 14, 2022 at 9:00 AM PT
Sessions
All times in PT
9:50 AM
9:20 AM
9:35 AM
9:00 AM
Migrate Your Apps to Android 13
Designing a High Quality App with the Latest Android Features
Building for a Multilingual World
Improving Your Social Experience Quality with Android Camera
10:10 AM
HDR 10BIT: Capture, Playback, and Sharing 10BIT Video
10:15 AM Foster User Trust by Adopting Privacy-respecting Permission
Workflows
10:28 AM
10:38 AM Presenting a High-quality Media Experience for all Users
Next Up on the Privacy Sandbox
10:58 AM
11:13 AM
Building Accessibility Support for Compose
Hardware Acceleration for ML on-device
11:27 AM Android Graphics
11:44 AM
Migrate to Play Billing Library 5 - More flexible subscriptions on Google Play
Demystifying Attestation
11:59 AM
12:14 AM
Supporting BLE Audio in Your Voice Communication Applications
12:24 PM
Building Modern Android App Widgets
12:33 PM #AskAndroid
12:52 PM
Everything About Storage on Android
1:05 PM
Keep your App From Failing in a 64-bit Only World
1:13 PM
Syncing Data with Health Connect
1:20 PM Introduction to Ultrawide-band on Android
Broadcast live on d.android.com/dev-summit & YouTube

Here’s what to expect on November 14th:

Get ready for all things platform! We’re kicking the livestream off at 9:00 AM PT on November 14th on YouTube and developer.android.com, where you’ll be able to watch almost 20 sessions, with talks such as:

  • Migrate your Apps to Android 13
  • Foster User Trust by Adopting Privacy-respecting Permission Workflows
  • Building for a Multilingual World
  • Android Graphics
  • Improving Your Social Experience Quality with Android Camera

And at approximately 12:30 PM PST, we’ll be hosting a live Q&A – #AskAndroid - so you can get your burning platform questions answered live by the team who built Android. Post your questions to Twitter or comment in the YouTube livestream using #AskAndroid for a chance to have your questions answered on the livestream.

Check out our previous tracks: Modern Android Development and Form Factors.

The Platform track is our third and final track for Android Dev Summit ‘22. Missed the earlier moments? You can still catch up on all of the content: watch the keynote on YouTube and check out the keynote recap so you don’t miss a beat! Plus, get up to speed on all things Modern Android Development with a recap video, blog, and the full MAD playlist where you can find case studies and technical sessions, as well as the recap for Form Factors and the full Form Factors session playlist.

We’re so excited for all the great content yet to come from Android Dev Summit, and we’re looking forward to connecting with you!

Continuing our Commitment to User Choice Billing

Posted by Paul Feng, Vice President, Product ManagementBuilding on Android’s long history of continuously evolving to provide users and developers more flexibility and choice, we announced earlier this year that we would begin exploring expanded billing options on Google Play through our user choice billing pilot. At the heart of this pilot is our belief that the best way to offer alternative billing for in-app purchases is to put the choice in the hands of users.

Pilot participants can offer an additional billing system alongside Google Play’s billing system for their users in select countries. Our goal is to understand complexities involved in supporting user choice billing for developers and users in countries across the world  while maintaining a safe and positive user experience. This pilot allows us to test and iterate on different implementations, and gather insights from developers and users on their experience to determine how this pilot might evolve.
Illustration of a woman standing in front of a large phone with Google Play logo prominently featured. At her feet are stacks of coins. To the right of the phone are icons for music, video, a key, gems, and stars
Learn more about the user choice billing pilot here

Partner participation and excitement

When we announced the pilot, we noted that we were starting with Spotify as our very first partner. We’ve been working closely with the Spotify team and are excited to announce that this week they begin rolling out an initial test implementation of user choice billing to their users in select countries. We expect the experience will likely evolve over time as they continue to iterate and learn. Spotify has announced more detail on this rollout here.

We’re also excited that Bumble has joined to partner with us in our user choice billing pilot. We’re working with their teams and we anticipate their users will begin seeing this choice in-app in select countries in the coming months.

Enable user choice billing in over 35 countries

Additionally, with strong interest from developers around the world, in September we opened participation in the pilot to to all developers of non-gaming apps. We provided more detail about the eligibility, requirements—including interim UX guidelines—and announced that user choice billing will initially be available to users in Australia, India, Indonesia, Japan, and the European Economic Area.

Today we are excited to announce that based on the positive response and initial feedback from developers and users, we are expanding the pilot to users in the United States, Brazil, and South Africa.
Greyscaled world map highlighting existing pilot countries in green (Australia, India, Indonesia, Japan, European Economic Area) and recently added pilot countries in blue (Brazil, South Africa, United States)
Participating developers can enable user choice billing in over 35 countries

While this is still early days in the pilot, we’re encouraged by this initial response and momentum, and look forward to sharing more in the coming months as we continue to build and iterate with our partners and roll out user choice billing to more users. To learn more about the pilot eligibility, requirements, and how to get started visit our Help Center.

Form Factors at Android Developer Summit ‘22

Posted by Alex Vanyo, Developer Relations EngineerThe Android Developer Summit is live with the second stop on our world tour - and we are thrilled to give you the latest updates on Android form factors! Discover the latest tools, APIs and guidance that make it easier to build apps that look great on large screens, wearables, and TVs. Here are the three things you need to know about form factors at ADS, and check out the full YouTube playlist here:

#1: Android developers are finding BIG success when optimizing their apps for large screens

The large screen category is growing, with over 270 million active large screen Android devices and an expanding portfolio of tablets, desktops, and foldables to choose from. That’s why there has never been a better time to be sure your app looks great across all screen sizes and postures. To learn practical tips for optimizing your app for large screens, check out the Do’s and Don’ts: Mindset for optimizing apps for larger screens session. Throughout the session, the Android team highlights design guidance, app quality, and additional tips for large screens on everything from reachability to canonical layouts. New Android Studio tools like emulators and reference devices make it easier to build and test.In-depth guides help you improve your app by optimizing layouts, avoiding camera issues, and enhancing support for peripherals like mouse, keyboard and stylus.

Large screens enable users to see more, do more, and experience more. With large screen sizes, there are ever-expanding opportunities to excite and delight your users with differentiated app experiences. That’s why we launched our new large screens gallery page during the Android Dev Summit kickoff, with general design tips and verticalized use cases, and implementation ideas.

#2: It’s easier than ever to develop for Wear OS

Compose for Wear OS is stable, bringing the modern UI toolkit to the wrist and making it simpler than ever to build exceptional Wear OS apps. This toolkit is designed to help you get your app up and running faster than before; Outdooractive adopted Compose for Wear OS and enhanced their wearable experience with 30% fewer development hours. Equally important as development time is the user experience you are able to provide. Todoist rebuilt their app using Compose for Wear OS, saw their growth rate on Google Play increase by 50%, and heard positive feedback internally and on their social media channels. To begin developing with Compose for Wear OS, get started on our curated learning pathway for a step-by-step learning journey. Where you can find documentation including a quick start guide and get hands on experience with the Compose for Wear OS codelab!

Outdooractive cut development time by an estimated 30% with Compose for Wear OS
The Android Developer Summit technical sessions dive deep into the content you need to build Wear OS apps, with guidance on app architecture, testing, handling rotary input and verticalized sessions for media and fitness. We have seen the impact that Health Services has had on developing health and fitness apps for the wrist, and how powerful this can be when extended with Health Connect on mobile. Using Google APIs and tools, Strava improved their user engagement and retention - with 30% more active days from Wear OS users on Strava than users without a wearable device. For more information on how to start building apps for Wear OS check out the developer site.

#3: Find tips and tricks for developing a great Android TV app

Finally, for Android TV we have collected tips for building amazing living room user experiences, including some new platform features in Android 12 and 13. TV is an important part of the Android ecosystem; of US households watch 25+ hours of content each week. Plus, there are now over 110 million monthly active AndroidTV OS devices. There is a ton to learn about how you can tap into this audience in our Improving the TV User Experience technical session including an update on Compose, seeing how App Bundles relate to TV, and guidance and best practices around energy savings and user preferences.

Those were the top three announcements about Form Factors at Android Developer Summit. Want to learn more? Check out the full form factors playlist on YouTube!

What’s next for Android Dev Summit’ 22? The Platform track, on November 14

This was the second stop on the Android Dev Summit ‘22 tour. Last month, we kicked things off with the keynote as well as our first track on Modern Android Development. After today’s second track on Form Factors, there’s more to come in our third and final track on the Platform, which will be broadcast live on YouTube next week on November 14. We can’t wait to see you again next week!

“Reach” Your Users on Large Screens

Posted by Diana Wong, Product Manager, Android Large screen devices like foldables and tablets mean your users have more screen to interact with. But they also can make it more difficult for those users to reach certain parts of their screen. Reachability, or what parts of the screen users can comfortably reach without stretching or adjusting their grip, is an important factor in user experience and accessibility and can help you decide where to place your app’s UI elements.

UI Elements on Large Screens

Large screens, such as tablets and foldables, are not always held and engaged with the same way as a smaller device like a phone. In the image below, you can see an example of how easily users can reach each area of a tablet with a width greater than nine inches.



The green area is easy for the majority of users to reach, the yellow and orange areas are only reachable for some users, and the red area is most difficult for users to reach. Within the red area, a user may need to adjust their grip or stretch to reach UI elements. It is important to consider how reachable each of your UI elements are to provide your users with the most optimal experiences.






Reachability isn’t “one size fits all”

Reachability can be impacted by a number of factors. First, device size can change what areas are reachable; larger devices mean it will be more difficult for users to reach the center of the screen. Another factor impacting reachability is the task a user is executing as users may hold their device in different ways for tasks like taking a photo versus using the keyboard. Hand size, measured from base of the wrist to the tip of the middle finger, can also affect how much of the device a user can reach. For example, take a look at the hand size data below. For tablets with a diagonal size greater than nine inches, users with hands larger than the US average can reach significantly more of the screen than users with hands smaller than average.
Hand size data showing differences in reachability between users with large hands and users with small hands
Additionally, how users hold their device changes depending on device orientation. As shown in the images below, devices used in portrait mode versus landscape impact the areas a user can comfortably reach.
Hand size data showing differences in reachability between users who hold their devices in landscape mode versus those who hold their devices in portrait mode

Finally, mostly due to screen size, foldable devices show some slightly different reachability patterns. Because they often have smaller screens than tablets, it is easier to reach the center of the device. However, the general pattern holds when it comes to reachability. When unfolded, the average user cannot reach the top 25% of the screen on a foldable device.

The DOs and DON’Ts of Large Screen Reachability

Reachability may vary by user, but there are some guidelines that can help your users’ large screen app experience. We have found that placing UI elements in the corners can be less than optimal. UI elements that are too close to the edges are going to be more likely to interact with user grip.Additionally, our reachability data shows that elements too close to the corners or edges of the device can be more difficult to reach, especially when a user is holding the device with both hands.

Now that you’ve learned all about reachability and the factors that impact it, here’s what you need to remember when building or updated an app for large screens:

DO: Limit interactions on the top 25% of the screen

The upper quarter of the screen can be hard to reach without changing one's grip.

DONT: Place critical and frequently used elements close to the screen's bottom edge and corners

Placing essential interactive elements too close to the bottom edge of the screen makes it more difficult for some users, particularly those with larger hands, to reach.

You can learn more about designing your app for large screens in our new gallery page or by checking out the Material Design guidance for large screens and foldables.

Power your Wear OS fitness app with the latest version of Health Services

Posted by Breana Tate, Developer Relations EngineerThe Health Services API enables developers to use on-device sensor data and related algorithms to provide their apps with high-quality data related to activity, exercise, and health. What’s more, you don’t have to choose between conserving battery life and delivering high frequency data–Health Services makes it possible to do both. Since announcing Health Services Alpha at I/O ‘21, we’ve introduced a number of improvements to the platform aimed at simplifying the development experience. Read on to learn about the exciting features from Health Services Beta in Android Jetpack that your app will be able to take advantage of when you migrate from Alpha.


Capture more with new metrics

The Health Services Jetpack Beta introduces new data and exercise types, including DataType.GOLF_SHOT_COUNT, ExerciseType.HORSE_RIDING, and ExerciseType.BACKPACKING. You can review the full list of new exercise and data types here. These supplement the already large library of data and exercise types available to developers building Wear OS apps with Health Services. Additionally, we’ve added the ability to listen for health events, such as fall detection, through PassiveMonitoringClient.

In addition to new data types, we’ve also introduced a new organization model for data in Health Services. This new model makes the Health Services API more type-safe by adding additional classification information to data types and data points, reducing the chance of errors in code. In Beta, all DataPoint types have their own subclass and are derived from the DataPoint class. You can choose from:

  • SampleDataPoints 
  • IntervalDataPoints 
  • StatisticalDataPoints
  • CumulativeDataPoints

DataTypes are categorized as AggregateDataTypes or DeltaDataTypes.

As a result of this change, Health Services can guarantee the correct type at compile time instead of at runtime, reducing errors and improving the developer experience. For example, location data points are now represented as a strongly-typed LocationData object instead of as a DoubleArray. Take a look at the example below:

Previously:

exerciseUpdate.latestMetrics[DataType.LOCATION]?.forEach {
  val loc = it.value.asDoubleArray()

  val lat = loc[DataPoints.LOCATION_DATA_POINT_LATITUDE_INDEX]
  val lon = loc[DataPoints.LOCATION_DATA_POINT_LONGITUDE_INDEX]
  val alt = loc[DataPoints.LOCATION_DATA_POINT_ALTITUDE_INDEX]

  println("($lat,$lon,$alt) @ ${it.startDurationFromBoot}")
}

Health Services Beta:

exerciseUpdate.latestMetrics.getData(DataType.LOCATION).forEach {
  // it.value is of type LocationData
  val loc = it.value
  val time = it.timeDurationFromBoot
  println("loc = [${loc.latitude}, ${loc.longitude}, ${loc.altitude}] @ $time")

}

As you can see, due to the new approach, Health Services knows that loc is of type List<SampleDataPoint<LocationData>> because DataType.LOCATION is defined as a DeltaDataType<LocationData, SampleDataPoint<LocationData>>.


Consolidated exercise end state

ExerciseState is now included within ExerciseUpdate’s ExerciseStateInfo property. To give you more control over how your app responds to an ending exercise, we’ve added new ExerciseStates called ExerciseState.ENDED and ExerciseState.ENDING to replace what was previously multiple variations of ended and ending states. These new states also include an endReason, such as USER_END, AUTO_END_PREPARE_EXPIRED, and AUTO_END_PERMISSION_LOST.

The following example shows how to check for exercise termination:

val callback = object : ExerciseUpdateCallback {
    override fun onExerciseUpdateReceived(update: ExerciseUpdate) {
        if (update.exerciseStateInfo.state.isEnded) {
            // Workout has either been ended by the user, or otherwise terminated
            val reason = update.exerciseStateInfo.endReason
        }
        ...
    }
    ...
}


Improvements to passive monitoring

Health Services Beta also transitions to a new set of passive listener APIs. These changes largely focus on making daily metrics better typed and easier to integrate. For example, we renamed the PassiveListenerConfig function setPassiveGoals to setDailyGoals. This change reinforces that Health Services only supports daily passive goals.We’ve also condensed multiple APIs for registering Passive Listeners into a single registration call. Clients can directly implement the desired overrides for only the data your app needs.

Additionally, the Passive Listener BroadcastReceiver was replaced by the PassiveListenerService, which offers stronger typing, along with better reliability and performance. Clients can now register both a service and a callback simultaneously with different requests, making it easier to register a callback for UI updates while reserving the background request for database updates.


Build for even more devices on Wear OS 3

Health Services is only available for Wear OS 3. The Wear OS 3 ecosystem now includes even more devices, which means your apps can reach even more users. Montblanc, Samsung, and Fossil are just a few of the OEMs that have recently released new devices running Wear OS 3 (with more coming later this year!). The newly released Pixel Watch also features Fitbit health tracking powered by Health Services.

If you haven’t used Health Services before, now is the time to try it out! And if your app is still using Health Services Alpha, here is why you should consider migrating:

  • Ongoing Health Services Development: Since Health Services Beta is the newest version, bug fixes and feature improvements are likely to be prioritized over older versions.
  • Prepares your app infrastructure for when Health Services goes to stable release
  • Improvements to type safety - less chance of error in code!
  • Adds additional functionality to make it easier to work with Health Services data

You can view the full list of changes and updated documentation at developer.android.com.


Coming up next for Android Dev Summit ‘22: The Form Factors track, on November 9!

Posted by Diana Wong, Product ManagerLast month, we kicked off the first part of Android Dev Summit, and later this week comes the second session track: Form Factors! In this track, we’ll bring you through all things Android form factors, including the API, tooling, and design guidance needed to help make your app look great on Android watches, tablets, TVs and more. We dropped information on the livestream agenda, technical talks, and speakers — so start planning your schedule!

Form Factors Track @ Android Dev Summit November 9, 2022 
Sessions: Deep Dive into Wear OS App Architecture, Build Better Uls Across Form Factors with Android Studio, Designing for Large Screens: Canonical Layouts and Visual Hierarchy Compose: Implementing Responsive UI for Large Screens, Creating Helpful Fitness Experiences with Health Services and Health Connect, The Key to Keyboard and Mouse Support across Tablets and ChromeOS Your Camera App on Different Form Factors,  Building Media Apps on Wear OS,  Why and How to Optimize Your App for ChromeOS. 
Broadcast live on d.android.com/dev-summit & YouTube.

Here’s what to expect on November 9th:

Get ready for all things form factors! We’re kicking the livestream off at 1:00 PM GMT on November 9th on YouTube and developer.android.com, where you’ll be able to watch over 20 sessions and check out the latest announcements on building for different form factors, with talks such as:

  • Build Better UIs Across Form Factors with Android Studio
  • Deep Dive into Wear OS App Architecture
  • Do's and Don'ts: Mindset for Optimizing Apps for Large Screens

And to wrap the livestream up, at 4:20 PM GMT, we’ll be hosting a live Q&A – #AskAndroid - so you can get your burning form factors questions answered live by the team who built Android. Post your questions to Twitter or comment in the YouTube livestream using #AskAndroid, for a chance to have your questions answered on the livestream.


There’s more to come!

There is even more to get excited for as the Android Dev Summit continues later this month with the Platform track. On November 14, we’re broadcasting our Platform technical talks where you’ll learn about the latest innovations and updates to the Android platform. You’ll be able to watch talks such as Android 13: Migrate your apps, Presenting a high-quality media experience for all users, and Migrating to Billing Library 5 and more flexible subscriptions on Google Play. Get a sneak peak at all the Platform talks here.

Missed the kick off event? Watch the keynote on YouTube and check out the keynote recap so you don’t miss a beat! Plus, get up to speed on all things Modern Android Development with a recap video, blog, and the full MAD playlist where you can find case studies and technical sessions.

We’re so excited for all the great content yet to come from Android Dev Summit, and we’re looking forward to connecting with you!

Accurately Measure Android App Performance with Profileable Builds


Posted by Yi Yang (Software Engineer)
It’s important to stay on top of your app performance to make sure your users can easily use your app. When an app experiences issues such as animation jank, frozen frames, and high memory usage, it negatively impacts the user experience which could lead to lower ratings or app deletion. To fix these performance issues, we first need the right tools to measure app performance correctly.
This is where profiling comes in. Profiling helps you find where CPU cycles and memory are spent at the time of inspection which makes it easier for you to pinpoint performance bottlenecks in your app. Android Studio offers a suite of profilers to help with the inspection.
Screenshot of Android Studio profilers
Historically, profiling an Android app required a debug build.
Screenshot of the debug/release build variants in Android Studio

The debug build allows you to use features useful for development, like Apply Changes, working with the debugger, or the Database Inspector. In addition, it also enables profiling tools to inspect the state of a running app unavailable to the release build.

Under the hood, the debug build sets the debuggable flag in the Android Manifest to true.

AndroidManifest.xml


<application android:debuggable="true">

  ...

</application>


While useful, the debug build is meant to provide more information at the cost of performance. That’s because when debuggable is true, a lot of compiler optimizations are turned off.
Screenshot of the Profile HWUI rendering setting in Developer Options. The option is in Developer Options > Monitoring > Profile HWUI rendering > On screen as bars
To show you the performance difference between the debug and release builds, we recorded an app running on the same device but in these two build variants. To visualize the frame rendering time, we turned on Profile GPU Rendering (or Profile HWUI rendering in some Android versions) in Developer Options when recording the screen. Each vertical bar on the bottom of the screen represents how long each frame takes to render. The shorter these bars are, the smoother the animation is.

The screen recording below shows the same app running on the same device. The left-hand side is on a debug build, the right-hand side a release build. The debug version has more stuttering frames, also known as UI jank. This means when you profile the debug build, you may see timing measurements significantly different from what your users see in the release build, and you may end up optimizing something that is not the problem.
GIF showing the performance difference between debug and release builds












To address that issue, the Android platform introduced a tag called profileable. It enables many profiling tools that measure timing information, without the performance overhead of the debug build. Profileable is available on devices running Android 10 or higher.

AndroidManifest.xml

<application>
    <profileable android:shell=["true" | "false"] />
</application>

Let’s look at another screen recording. This time, the left side shows a profileable release app and the right side an unmodified release app. There’s little performance difference between the two.

GIF showing the performance difference between profileable and release builds


With profileable, you can now measure the timing information much more accurately than the debug build.

This feature is designed to be used in production where app security is paramount. Therefore we decided to only support profiling features such as Callstack Sampling and System Trace, where timing measurement is critical. The Memory Profiler only supports Native Memory Profiling. The Energy Profiler and Event Timeline are not available. The complete list of disabled features can be found here. All these restrictions are put in place to keep your app's data safe.

Now that you know what the profileable tag does, let me show you how to use it. There are two options: automatically and manually.


Option 1: Use the option in Android Studio.

With Android Studio Flamingo and Android Gradle Plugin 8.0, all you need to do is just select this option from the Profile dropdown menu in the Run toolbar: “Profile with low overhead”. Then Android Studio will automatically build a profileable app of your current build type and attach the profiler. It works for any build type, but we highly recommend you to profile a release build, which is what your users see.

Screenshot of the one-click profileable builds feature in Android Studio Flamingo Canary
When a profileable app is being profiled, there is a visual indicator along with a banner message. Only the CPU and Memory profilers are available.
Screenshot of Android Studio profiler profiling a profileable build
In the Memory Profiler, only the native allocation recording feature is available due to security reasons.
Screenshot showing Android Studio memory profiler features when profiling a profileable build











This feature is great for simplifying the process of local profiling but it only applies when you profile with Android Studio. Therefore, it can still be beneficial to manually configure your app in case you want to diagnose performance issues in production or if you’re not ready to use the latest version of Android Studio or Android Gradle plugin yet.


Option 2: Manual configuration.

It takes 4 steps to manually enable profileable.

1.    Add this line to your AndroidManifest.xml.

 AndroidManifest.xml

<application>
  <profileable android:shell="true" />
</application>

2.    Switch to the release build type (or any build type that’s not debuggable).
Screenshot of selecting the active build variant in Android Studio
















3.    Make sure you have a signing key configured. To prevent compromising your release signing key, you can temporarily use your debug signing key, or configure a new key just for profiling.




 








 




  

 
4.    Build and run the app on a device running Android 10 or higher. You now have a profileable app. You can then attach the Android Studio profiler by launching the Profiler tool window and selecting the app process from the dropdown list.
Screenshot of process selection in Android Studio profilersMany of you may wonder if it is safe to leave the profileable manifest tag in production and the answer is yes. This tag is designed to be usable in release builds to enable local profiling. No memory data is readable by the host profiling tools and the shell process. Only stack traces are readable, which are typically obfuscated or lacking symbols in release builds.

In fact, many first-party Google apps such as Google Maps ship their app to the Play Store as profileable apps.

Screenshot showing Google Maps as a profileable process in the profiler process dropdownIn summary, profiling the debug build may skew the performance and therefore it’s better to analyze the release build with the profileable tag enabled.

Here’s a table that shows which build type should be used:

ReleaseProfileable ReleaseDebug
ProductionProfiling CPU timingDebugger, Inspectors, etc.

Profiling memory, energy, etc.

To learn more about profilable builds, start by reading the documentation and the the user guide.

With these tools provided by the Android team, we hope you can make your app run faster and smoother.

Play it forward: Evolving our platform for another decade of developer success

Posted by Alex Musil, Director of Product, Google Play

It’s been a big milestone year for Google Play. Having just celebrated our 10th birthday, we’re looking ahead to the next 10 years and thinking about the ways our platform needs to evolve. To do that, we’re launching tons of new features to help you build more sustainable businesses and improve the experience for everyone in the Play ecosystem.

We’ve always been committed to making Google Play a place for developers to build successful businesses, while helping users safely find high-quality content to enjoy. That’s why, over the last year, we’ve made several updates designed to help our developers in ways big and small, from major investments in new content to targeted beta programs to help you find your niche. So in case you missed any of our recent announcements, here’s a recap of all the big updates we’ve recently made to our platform.


Supporting and rewarding great apps and games on Google Play

We’re developing new ways to promote and support high-quality titles throughout the entire lifecycle, from acquisition and engagement to retention and reacquisition. That’s why, over the coming months, we’re rolling out enhancements to Google Play and Google Play Console that embed your key events, content, and offers across the Google Play experience.

For select titles, LiveOps is a great way to reach users directly with offers, launches, and events. Soon, we’ll be expanding how your content is used on Google Play by creating new high-impact placements and formats. Because new content types will be added over time, we’re renaming LiveOps to “Promotional Content” to better reflect the breadth of content you can submit. Promotional Content is already available for thousands of titles and we're looking to expand to more developers next year.


New content formats will help users discover and rediscover high-quality content to enjoy. Final design may vary.

Another key part of the lifecycle is bringing back users who’ve tried your title before. Rolling out towards the end of this year, Churned-user Custom Store Listings will enable you to tell a different story to users who’ve tried but uninstalled your apps or games. If you’d like to be one of the first to try this feature, let us know by filling out this form.


Raising the bar on technical quality

Android users expect a great experience from the apps and games they download, so we’re making higher-quality titles more visible on the Play Store and steering users away from lower-quality ones. One of the most important ways to boost your app quality and attract more users is to focus on technical quality. To do that, we’re implementing new quality thresholds that better align with the user experience.

GOOGLE PLAY’S APP QUALITY BAR
To maximize visibility on Google Play, keep your app below these thresholds.
Core vital

Overall (across all devices)

Per phone model

User-perceived crash rate1.09%8%
User-perceived ANR rate

0.47%8%

Some apps and games that don’t meet these thresholds will be excluded from impactful discovery surfaces such as recommendations, while others may display a warning on their store listing to set appropriate user expectations.

Check out this blog post to learn more about these changes, plus new features in Android vitals to help you monitor and act on technical issues and opportunities.

A more flexible and powerful commerce platform

This year, we’ve made improvements across our commerce platform, including an improved purchase experience, more flexibility and control over your subscriptions, and new monetization insights and programs to help you boost your revenue.

For example, we’ve improved the purchase flow for purchases made by a child or family member account. Parents or the “family manager” can now make purchases on behalf of their child without setting up a family payment method. Now when a family member tries to make a purchase in your app without a family payment method set up, we’ll send a purchase request to the family manager. The family manager can then complete the purchase with any payment method, including gift cards.

For more commerce updates, check out our blog post.


Keeping Google Play Safe with New Features and Programs

Our safety initiatives and policies evolve to help developers like you launch trusted experiences to more than 2.5 billion users around the world.

First, we’re launching new Play Integrity API features to help you defend against unknown, risky traffic. You can customize your API responses and set up tests in Play Console, and use new reporting to analyze and break down API responses across your install base. And, soon, you’ll be able to debug Integrity API responses from the Play Store app’s developer settings on any device.

Second, we’re launching multiple programs to better partner with you. We’re helping protect your apps against inaccurate, coordinated review attacks, providing more communication and global training about our policies and how to comply, and expanding pilots on direct phone support and enforcement strike removal.

And finally, our Developer Previews offer a more privacy-friendly approach to advertising. Please share your Privacy Sandbox feedback with us as we continue to build this multi-year program alongside our advertising industry and developer partners.


Google Play Games beta on PC continues global expansion

Earlier this year, we announced that Google Play Games would be coming to PCs as a beta experience to a limited number of markets. In August, we expanded the product to all players in Korea, Hong Kong, Taiwan, Thailand, and Australia. Beginning today, we’re excited to make Google Play Games beta available for download to all players in the United States, Canada, Mexico, Brazil, Indonesia, Philippines, Malaysia, and Singapore.

In the last few months, our Google Play Games catalog growth has been accelerating with many popular mobile titles including 1945 Air Force, Blade Idle, Cookie Run: Kingdom, and Evony: The King’s Return. All of these titles and dozens more can be played on Windows PCs via a standalone application built by Google.

This program builds on our goal of meeting players where they are, giving them access to their games on as many devices as possible. Additionally, since launching earlier this year we have made significant strides to reach even more players by reducing the minimum spec requirements to PCs running Windows 10+ with an integrated graphics card and 4+ core CPU. To learn more, check out our blog post.

ALT TEXT
Android games can be seamless synced across signed-in devices with Google Play Games.

Thank you for being a part of the Google Play ecosystem, whether you’ve recently joined or been with us since the beginning. Together, we’re looking forward to another 10 exciting years.


How useful did you find this blog post?



Purchase optimization, flexible subscriptions, and revenue growth with Play Commerce

Posted by Jian Zhou, Director of Engineering, Google Play CommerceGoogle Play Commerce provides buyer support in over 190 markets, extensive support for local payment methods, and monetization tools to increase buyer conversion, engagement, and retention – all built on our trusted and secure platform. This year, we’ve made improvements across our platform, with new purchase optimizations, more flexibility and control when selling subscriptions, and enhancements to monetization insights and programs aimed at boosting your revenue.

Smoother, more frictionless purchase experience

Google Play offers users a consistent, familiar purchase experience, and over the past year we’ve launched two major new features to make in-app purchases even more frictionless.

  • Multi-quantity purchases allow your users to purchase more than one of a popular item with ease. You can configure which products are eligible for multi-quantity directly in Play Console to let users easily select the quantity they want to purchase directly in the cart.
    Screenshot of phone screen showing multi-quantity purchasing capability in Google Play
    Implement multi-quantity purchases to allow users to easily purchase more than one item at a time.
  • We are also improving the experience for purchases made by supervised accounts, and users will start seeing this update rollout this month. Parents or “the family manager” can now make app & in-app purchases for their child without requiring to set up a family payment method.
For example, when a child account attempts to make a purchase in your app without a family payment method set up, instead of prompting them to ask the family manager to set one up, a purchase request is sent to the family manager who can complete the purchase with any payment method on their profile, including gift cards. If preferred, the family manager still has the option to set up a family payment method.
Screenshot of four phone screens showing child request purchase and parent approve & buy capability in Google Play
Parents can now easily approve purchases requested by child accounts with their own profile without needing to set up a family payment method.



More flexible subscriptions to improve reach, conversion, and retention

Digital subscriptions continue to be one of the fastest-growing ways for developers to monetize on Google Play, so we reimagined the developer experience and added new tools to give you more flexibility and control when it comes to growing and retaining your subscribers.

  • New subscription capabilities separate your subscription products – what you sell – from how you sell them, allowing you to configure multiple base plans and offers for each subscription. This can help you reduce operational costs by eliminating the need to create and manage an ever-increasing number of SKUs.

    In the past, multiple billing durations and special offers were each defined as fully independent SKUs. If multiple SKUs provided the same benefits with different combinations of billing periods or pricing, this quickly became complex.

    Diagram of Old and New models showing subscription tiers in Google Play
    New model separates your subscription products – what you sell – from how you sell them

    Check out the video below and take our Play Academy course to learn more about configuring base plans and offers for your subscription, including offering prepaid plans that allow users access to pay a fixed amount of time, and then top-up as desired. If you haven’t yet integrated, check out this guide, documentation, and sample app to get started.

  • We also launched In-App Messaging, a new way to retain more subscribers following a declined payment. Simply call the In-App Messaging API when a user opens the app, and if the user’s payment has been declined, they will be prompted to update their payment information.
~2X Subscription recovery when users saw the message* Moving image showing In App Messaging API in Google Play
*Based on experiments with early users
  • Another way to improve retention is by adding benefits describing your subscription in Play Console. Benefits can remind users of the value they get from your subscription at key moments, such as when the user comes to manage their subscription on Play.
Screenshot of a phone screen displaying app benefits in the Cancel screen in Google Play
Add benefits descriptions to remind users of the value received from your subscription

Monetization insights and programs to boost your revenue

Ensuring your app or game’s monetization strategy reaches its full revenue potential is an important focus for us. This year we’ve launched a new monetization insights tool and continued to invest in programs that can complement your strategy.

  • We realize how important it is to contextualize which metrics drive your topline revenue and which lower-level metrics can be further optimized to maximize your game’s revenue. Strategic guidance provides a visual metric hierarchy in Play Console of how your game’s revenue metrics impact your business goals and helps you to identify which metrics to prioritize, as well as opportunities to optimize a chosen metric by providing peer group benchmarks, country breakdowns, and trends. Check out the video below to learn more about strategic guidance and how its metric-specific recommendations can help transform insights into action.

  • Google Play Points is another way to boost your revenue. Since launch, over 100 million members have joined the program! This year, those members have invested over billions of earned points into titles, increasing revenue on average between 5% and 30% for participating developers. Play Points has expanded to over 30 markets, including this year’s launches for users in India, Mexico, Czech Republic, and Poland. We’ve also added the ability to track Points coupon and out of app product transactions through financial reports in Play Console.
  • Google Play Pass is a great way to complement your app or game’s monetization strategy - already featuring 1,100+ titles from over 500 developers. For Play Pass participating titles, we’ve seen Play revenue nearly double on average. Play Pass is now available in 92 markets, including expansion to two new key markets this year: India and Japan. We’ve also added over 200 new apps and games to our catalog this year and continue to invest in Play Pass’s growth by investing $2 million in local game studios, with our first Indie Games Fund in LATAM.

Screenshot of a phone screen showing Google Play Passs in Google Play

All these features and tools are now available on Google Play. To take full advantage of In-App Messaging, prepaid plans, and the new subscription capabilities, update to Play Billing Library 5.0 or newer. As we continue to invest in Play Commerce, we look forward to expanding your buyer reach and developing new monetization tools to help you grow your business.