Posted by The Android Team
As one of the most widely used social media platforms, Twitter is always hunting for ways to better connect its users. At the same time, in order to efficiently build new features while maintaining existing ones, developers need supportive infrastructure. The Twitter engineering team turned to Jetpack Compose to kick-start a much needed overhaul of the app’s UI foundation. With Compose, developers can easily find and use the right APIs, fluidly style and modularize components, and ultimately build more with less code.
A handful of teams such as the Android Client UI team, Customer Acquisition, Twitter Blue, and Communities teams revamped their development processes, inspiring excitement among Twitter’s engineers. “Several teams at Twitter have adopted Compose in their daily workflows,” said Sneha Patil, senior software engineer and technical lead on the Communities team for Twitter for Android. By removing the work of creating and setting up custom theming and attributes, Compose made writing functions and implementing design requirements significantly faster and more simple than what they experienced with Views. Jetpack Compose enabled these teams to work faster and more effectively, ensure reusability in their code, and easily onboard new engineers.
Creating dynamic content is straightforward with Compose. The Twitter team used the LazyColumn composable to build UI without the need for an Adapter or ViewHolder, simplifying the process of writing code that seamlessly brings layouts, themes, and styles to life. With fewer lines to write, development teams at Twitter decreased their boilerplate, experienced less bugs during development and releases, enabled UI experimentation, and sped up the testing processes. These improvements heightened productivity so developers could spend more time building what makes Twitter unique.
They also used Compose to build stateless components that are reusable across the app. The flexibility of Compose made it easier and faster to meet design requirements, making the setup of theming and styling easier for both new and experienced engineers to work with.
Given the improvements experienced, they decided to build an entire new feature using Compose. They built the Communities feature, Twitter's dedicated space where users can engage in discussions they care about most, from the ground up using Compose. Based on the teams’ previous experience using Views for other features, building with Compose was much faster and they had less bugs. “It was like magic,” said Sneha, “It’s a game changer for how we can develop on Android with Compose.”
Compose boosted the velocity and efficiency of Twitter engineers’ UI development. Developers easily incorporated and built with Compose, which made it easier for them to modularize code, reuse components, and break down dependencies. The team regularly utilizes UI experimentation, and Compose helped increase their confidence in knowing what the components that react to user interactions, data updates, and different screen sizes will look like in production.
These teams’ initial success with Compose inspired other development teams at Twitter to follow suit. Now, even engineers working on complex legacy components are looking into adopting it.
Overall, Compose has not only removed many of the obstacles the team experienced in Views — it also added enjoyment into the workflow, with some developers ready to abandon old methods for good. “I’m excited to write more Compose and never touch an XML layout again,” said Yoali Sotomayor Baqueiro, software engineer for Android Client UI at Twitter. “It makes developing UI not just easier but also much more fun and intuitive.”
Optimize your UI development with Compose.
Posted by The Google Play Team
Creating a consistent and intuitive user experience is more important than ever to grow your audience and scale your business. To help you, Google Play, Android, and Firebase shared the latest insights and best practices on building high quality Android apps, improving developer productivity, and creating the best possible experience across all Android devices at the 2022 Android App Excellence Summit.
If you missed any sessions, we have you covered! You can watch all the content from the summit on our #AppExcellenceSummit playlist here.
Some highlights include;
Curious for more? Get additional resources of everything we shared at the 2022 Android App Excellence Summit by visiting g.co/android/appexcellence.
We are committed to empowering the developer ecosystem to build high quality experiences across all Android devices. We greatly appreciate all that joined us during our App Excellence Summit and we’re looking forward to hearing your feedback. Keep in touch with us on Twitter with #AppExcellenceSummit.
Posted by Krish Vitaldevara, Director, Product Management
Google Play helps our developer community distribute the world's most innovative and trusted apps to billions of people. This is an ongoing process and we're always working on ways to improve app safety across the ecosystem.
In addition to the Google Play features and policies that are central to providing a safe experience for users, each Android OS update brings privacy, security, and user experience improvements. To ensure users realize the full benefits of these advances—and to maintain the trusted experience people expect on Google Play—we collaborate with developers to ensure their apps work seamlessly on newer Android versions.
We currently require new apps and app updates to target an Android API level within one year of the latest major Android OS version release. New apps and app updates that don’t meet this requirement cannot be published on Google Play. For exact timelines, please refer to this Help Center article.
Current target API Level requirements for new apps and app updates
Today, as part of Google Play’s latest policy updates, we are taking additional steps to protect users from installing apps that may not have the latest privacy and security features by expanding our target level API requirements.
Starting on November 1, 2022, existing apps that don’t target an API level within two years of the latest major Android release version will not be available for discovery or installation for new users with devices running Android OS versions higher than apps’ target API level. As new Android OS versions launch in the future, the requirement window will adjust accordingly.
Target API Level requirements for existing apps, starting November 1
The rationale behind this is simple. Users with the latest devices or those who are fully caught up on Android updates expect to realize the full potential of all the privacy and security protections Android has to offer. Expanding our target level API requirements will protect users from installing older apps that may not have these protections in place.
The good news is that the vast majority of apps on Google Play already abide by these standards. For other apps, we know this will require additional attention, which is why we are notifying developers well in advance and providing resources for those who need them.
We encourage you to:
Current users of older apps who have previously installed the app from Google Play will continue to be able to discover, re-install, and use the app on any device running any Android OS version that the app supports.
This strengthened Target Level API policy is just one of the policy updates we announced today to expand user protections and improve user experiences on Google Play. We’ll continue to share updates about this important work that will help raise the bar for app privacy and security across the board, making Google Play and Android a safer place for everyone.
Posted by Haoran Man, Niv Govindaraju, Rohit Sampathi, and Antriksh Saxena
As the home for your memories, Google Photos is loved by hundreds of millions of people around the world. One key focus area for us is how we continue to create truly helpful and compelling experiences for our users to cherish memories with their friends and family. We recently brought our Memories feature to Android widgets, enabling users to easily enjoy an ambient stream of photos right on their phone’s home screen. To increase the widget’s awareness, we experimented with a notification campaign that ended up increasing widget DAUs by 10x. Read on for more on how we accomplished this...
Despite our belief that the Memories widget was a helpful and requested feature from our users, initial adoption was relatively low, with tapering organic growth in the weeks following launch. There was clearly plenty of headroom to grow awareness of this feature so we started brainstorming ways to make it easier for users to learn about and try out the widget.
We decided to experiment with notifications given Photos’ past success in using them as a helpful nudge for feature discovery. We quickly put together a notification campaign that targeted eligible Photos Android users with Memories content. They each received a notification informing them of the widget, and on tap-through would be dropped directly into the Memories widget install flow. In just a couple seconds, they could have the widget set up and start seeing their special moments featured on screen.
The notification campaign proved highly successful: we achieved a 15% conversion rate, ultimately resulting in 10x widget DAUs compared to before the campaign.
Here are a few reasons why we believe this campaign was so effective:
1. A clear value proposition
We believe notifications, like our features, should be helpful, not a nuisance. That means always having a clear and concise value proposition. Keeping the copy length short, highlighting contextual information, and being clear on the value-add has often resonated better with users and resulted in higher click-through & conversion rates.
With this in mind, we ran a quick experiment to test 3 candidate copies for the widget in order to determine which had the highest conversion. The best-performing copy ended up yielding a +12% improvement on widget installs compared to the worst-performing copy.
2. A streamlined post-click flow
We configured the notification to open directly into the widget install picker, making it really easy for users to install and start playing with the widget right away. A similar campaign from earlier this year to promote our iOS widget lacked this streamlining and we unsurprisingly saw lower conversion, likely from the extra friction.
We hope these tips prove helpful to you as you design your next notification campaign.
Posted by Janelle Kuhlman, Developer Relations Program Manager
For Women’s History Month, we’re celebrating a few of our Google Developer Experts. Meet Maryam Alhutayfi, Android GDE. The GDE program team encourages qualified candidates that identify as women or non-binary to express interest in joining the community by completing this form.
Android GDE Maryam Alhuthayfi has loved programming since high school, when she learned programming in Visual Studio and basic website development.
“We didn't get much beyond that because there weren’t many Arabic resources,” she says. “That experience got me excited to dig deeper into technology. I wanted to know how the web functions, how software is made, and more about programming languages.”
Maryam studied computer science at university and majored in information systems. For her senior year graduation project, she and her team decided to build an Android application, her first experience with Android. She graduated with honors and landed a job as a web developer, but she kept thinking about getting back to being an Android developer.
She joined Women Techmakers in Saudi Arabia in 2019, when the group launched, to connect with other women in tech to help and support. She got a job as an Android robotics developer and became a co-organizer of GDG Cloud Saudi, her local Google Developer Group. Now Maryam is a senior Android development specialist at Zain KSA, one of Saudi Arabia’s largest telecommunications companies, which she describes as “a dream come true,” and in January 2022, she became an Android GDE.
Maryam is the first Android GDE in the Middle East and the second in MENA. She contributes to the Android community by speaking about Android and Kotlin development in detail, and software development more generally. She maintains a blog and GitHub repository and gives numerous talks about Android development. She encourages Android developers to use Kotlin and Jetpack Compose, and she describes both as causing a major shift in her Android development path. She started the Kotlin Saudi User Group in 2020.
Maryam regularly mentors new Android developers and gives talks on Android for Women Techmakers and Women Who Code. She encourages Android developers at big companies like Accenture and Careem to join and contribute to the Android community.
Remembering how few Arabic resources she had as a high school student, Maryam creates both Arabic and English content to enrich Android learning resources. “I made sure those resources would be available to anyone who wants to learn Android development,” she says. “Locally, in collaboration with GDGs in Saudi Arabia, we host sessions throughout each month that cover Android, Flutter, and software development in general, and other exciting topics, like data analytics, cyber security, and machine learning.”
She regularly attends the Android developer hangouts led by Android GDE Madona Wambua and Android developer Matt McKenna to learn more and get inspired by other Android developers in the community.
In her full-time job, Maryam is immersed in her work on the official Zain KSA app.
“It’s my job and my team’s job to give our millions of customers the best experience they can have, and I’m pushing myself to the limit to achieve that” she says. “I hope they like it.”
Maryam encourages other new developers, especially women, to share their knowledge.
“Communicate your knowledge–that makes you an expert because people will ask you follow-up questions that might give you different perspectives on certain things and shift your focus on learning new things constantly ” she says. “You serve others by sharing your knowledge.”
Follow Maryam on Twitter at @Mal7othify | Learn more about Maryam on LinkedIn.
The Google Developers Experts program is a global network of highly experienced technology experts, influencers, and thought leaders who actively support developers, companies, and tech communities by speaking at events and publishing content.
The GDE program team encourages qualified candidates that identify as women or non-binary to express interest in joining the community by completing this form.
Posted by Mauricio Vergara, Product Marketing Manager, with contibutions by Thousand Ant.
Lyft is singularly committed to app excellence. As a rideshare company — providing a vital, time-sensitive service to tens of millions of riders and hundreds of thousands of drivers — they have to be. At that scale, every slowdown, frozen frame, or crash of their app can waste thousands of users’ time. Even a minor hiccup can mean a flood of people riding with (or driving for) the competition. Luckily, Lyft’s development team keeps a close eye on their app’s performance. That’s how they first noticed a slowdown in the startup time of their drivers’ Android app.
They needed to get to the bottom of the problem quickly — figure out what it would take to resolve and then justify such an investment to their leadership. That meant answering a number of tough questions. Where was the bottleneck? How was it affecting user experience? How great a priority should it be for their team at that moment? Luckily, they had a powerful tool at their disposal that could help them find answers. With the help of Android vitals, a Google Play tool for improving app stability and performance on Android devices, they located the problem, made a case for prioritizing it to their leadership, and dedicated the right amount of resources to solving it. Here’s how they did it.
The first thing Lyft’s development team needed to do was figure out whether this was a pressing enough problem to convince their leadership to dedicate resources to it. Like any proposal to improve app quality, speeding up Lyft Driver’s start-up time had to be weighed out against other competing demands on developer bandwidth: introducing new product features, making architectural improvements, and improving data science. Generally, one of the challenges to convincing leadership to invest in app quality is that it can be difficult to correlate performance improvements with business metrics.
They turned to Android vitals to get an exact picture of what was at stake. Vitals gives developers access to data about the performance of their app, including app-not-responding errors, battery drainage, rendering, and app startup time. The current and historical performance of each metric is tracked on real devices and can be compared to the performance of other apps in the category. With the help of this powerful tool, the development team discovered that the Lyft Driver app startup time was 15–20% slower than 10 other apps in their category — a pressing issue.
Next, the team needed to establish the right scope for the project, one that would be commensurate with the slowdown’s impact on business goals and user experience. The data from Android vitals made the case clear, especially because it provided a direct comparison to competitors in the rideshare space. The development team estimated that a single developer working on the problem for one month would be enough to make a measurable improvement to app startup time.
Drawing on this wealth of data, and appealing to Lyft’s commitment to app excellence, the team made the case to their leadership. Demonstrating a clear opportunity to improve customer experience, a reasonably scoped and achievable goal, and clear-cut competitive intelligence, they got the go-ahead.
Lyft uses “Time to interact” as a primary startup metric (also known as Time to full display). To understand the factors that impact it, the Lyft team profiled each of their app’s launch stages, looking for the impasse. The Lyft Driver app starts up in four stages: 1) First, start the application process 2) “Activity” kicks off the UI rendering. 3) “Bootstrap” sends network requests for the data necessary to render the home screen. 4) Finally, “Display” opens the driver’s interface. Rigorous profiling revealed that the slowdown occurred in the third, bootstrapping, phase. With the bottleneck identified, the team took several steps to resolve it.
First, they reduced unneeded network calls on the critical launch path. After decomposing their backend services, they could safely remove some network calls in the launch path entirely. When possible, they also chose to execute network calls asynchronously. If some data was still required for the application to function, but was not needed during app launch, these calls were made non-blocking to allow the launch to proceed without them. Blocking network calls were able to be safely moved to the background. Finally, they chose to cache data between sessions.
These may sound like relatively small changes, but they resulted in a dramatic 21% reduction in app startup time. This led to a 5% increase in driver sessions in Lyft Driver. With the results in hand, the team had enough buy-in from leadership to create a dedicated mobile performance workstream and add an engineer to the effort as they continued to make improvements. The success of the initiative caught on across the organization, with several managers reaching out to explore how they could make further investments in app quality.
The success of these efforts contains several broader lessons, applicable to any organization.
As an app grows and the team grows with it, app excellence becomes more important than ever. Developers are often the first to recognize performance issues as they work closely on an app, but can find it difficult to raise awareness across an entire organization. Android vitals offers a powerful tool to do this. It provides a straightforward way to back up developer observations with data, making it easier to square performance metrics with business cases.
When starting your own app excellence initiative, it pays to first aim for small wins and build from there. Carefully pick actionable projects, which deliver significant results through an appropriate resource investment.
It’s also important to communicate early and often to involve the rest of the organization in the development team’s quality efforts. These constant updates about goals, plans, and results will help you keep your whole team on board.
Android vitals is just one of the many tools in the Android ecosystem designed to help understand and improve app startup time and overall performance. Another complementary tool, Jetpack Macrobenchmark, can help provide intelligence during development and testing on a variety of metrics. In contrast to Android vitals, which provides data from real users’ devices, Macrobenchmark allows you to benchmark and test specific areas of your code locally, including app startup time.
The Jetpack App startup library provides a straightforward, performant way to initialize components at application startup. Developers can use this library to streamline startup sequences and explicitly set the order of initialization. Meanwhile, Reach and devices can help you understand your user and issue distribution to make better decisions about which specs to build for, where to launch, and what to test. The data from the tool allows your team to prioritize quality efforts and determine where improvements will have the greatest impact for the most users. Perfetto is another invaluable asset: an open-source system tracing tool which you can use to instrument your code and diagnose startup problems. In concert, these tools can help you keep your app running smoothly, your users happy, and your whole organization supportive of your quality efforts.
If you’re interested in getting your own team on board for the pursuit of App Excellence (or join Lyft), check out our condensed case study for product owners and executives linked here.
Posted by Marwa Mabrouk, Android Camera Platform Product Manager
Android Camera is an exciting space. Camera is one of the top reasons consumers purchase a phone. Android Camera empowers developers today through different tools. Camera 2 is the framework API that is included in Android since Android 5.0 Lollipop, and CameraX is a Jetpack support library that runs on top of Camera 2, and is available to all Android developers. These solutions are meant to complement each other in addressing the needs of the Android Camera ecosystem.
For developers who are starting with Android Camera, refreshing their app to the latest, or migrating their app from Camera 1, CameraX is the best tool to get started! CameraX offers key benefits that empower developers, and address the complexities of the ecosystem.
For developers who are building highly specialized functionality with Camera for low level control of the capture flow, and where device variations are to be taken into consideration, Camera 2 should be used.
Camera 2 is the common API that enables the camera hardware on every Android device and is deployed on all the billions of Android devices around the world in the market today. As a framework API, Camera 2 enables developers to utilize their deep knowledge of photography and device implementations. To ensure the quality of Camera 2, device manufacturers show compliance by testing their devices. Device variations do surface in the API based on the device manufacturer's choices, allowing custom features to take advantage of those variations on specific devices as they see fit.
To understand this more, let’s use an example. We’ll compare camera capture capabilities. Camera 2 offers special control of the individual capture pipeline for each of the cameras on the phone at the same time, in addition to very fine grained manual settings. CameraX enables capturing high-resolution, high-quality photos and provides auto-white-balance, auto-exposure, and auto-focus functionality, in addition to simple manual camera controls.
Considering application examples: Samsung uses the Camera Framework API to help the advanced pro-grade camera system to capture studio-quality photos in various lightings and settings on Samsung Galaxy devices. While the API is common, Samsung has enabled variations that are unique to each device's capabilities, and takes advantage of that in the camera app on each device. The Camera Framework API enables Samsung to reach into the low level camera capabilities, and tailor the native app for the device
Another example, Microsoft decided to integrate CameraX across all productivity apps where Microsoft Lens is used (i.e. Office, Outlook, OneDrive), to ensure high quality images are used in all these applications. By switching to CameraX, the Microsoft Lens team was able not only to improve its developer experience in view of the simpler API, but also improve performance, increase developer productivity and reduce time to go to market. You can learn more about this here.
This is a very exciting time for Android Camera, with many new features on both APIs:
As we move forward, we plan to share with you more details about the exciting features that we have planned for Android Camera. We look forward to engaging with you and hearing your feedback, through the CameraX mailing list: camerax-developers@android.com and the AOSP issue tracker.
Thank you for your continued interest in Android Camera, and we look forward to building amazing camera experiences for users in collaboration with you!