# Android@Microsoft

#Mobile development articles and news brought to you by #MobileDevs working at @Microsoft - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Distributing big AI models in mobile apps

DevFeed: [Distributing big AI models in mobile apps](<https://devfeed.tech/articles/distributing-big-ai-models-in-mobile-apps-22780.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/distributing-big-ai-models-in-mobile-apps-ae674e501d3d?source=rss----87f10537e947---4>)

Author: SwiftKey

Published: 2025-12-04T15:31:35Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [AI Models](<https://devfeed.tech/topics/ai-models.md>), [Google Play](<https://devfeed.tech/topics/google-play.md>), [Internationalization (i18n)](<https://devfeed.tech/topics/i18n.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-model-distribution](<https://devfeed.tech/tags/ai-model-distribution.md>), [ai-models](<https://devfeed.tech/tags/ai-models.md>), [ai-on-mobile](<https://devfeed.tech/tags/ai-on-mobile.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [app-size](<https://devfeed.tech/tags/app-size.md>), [apps](<https://devfeed.tech/tags/apps.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [designer](<https://devfeed.tech/tags/designer.md>), [download](<https://devfeed.tech/tags/download.md>), [emoji](<https://devfeed.tech/tags/emoji.md>), [engine](<https://devfeed.tech/tags/engine.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [languages](<https://devfeed.tech/tags/languages.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [model](<https://devfeed.tech/tags/model.md>), [models](<https://devfeed.tech/tags/models.md>)

### AI overview

For SwiftKey, AI features around 5% of its roughly 20 MB download size or larger prompt careful distribution choices. Cloud models can be larger, updated for all users at once, and keep the app small, but require connectivity, incur per-use costs, and send data off device; the article cites DALL-E 3 sticker generation as an infrequent, latency-tolerant cloud feature. On device, models can work offline without API charges and may offer easier privacy, but use storage and device computing power. Options include using Gemini Nano through Android AICore, bundling a model in the main app, delivering it on demand through Google Play dynamic features or asset packs, or downloading it at runtime from a server. Dynamic delivery avoids downloading models for everyone but adds installation complexity, is limited to Google Play, and still requires app updates for model changes. Runtime downloads support many varied models and independent updates, but the app team pays hosting and download costs. SwiftKey uses runtime downloads for more than 700 language packs, about 2-20 MB each. Latency depends on network round trips and processing time; the text recommends assessing each implementation and,,

### Source excerpt

This is based on a talk given by Beatriz Viñal Murciano (LinkedIn) at droidcon SF (June 2024, video, slides) and Víctor Julián García Granado (LinkedIn) at droidcon Lisbon (September 2024, video) about how we use AI models in our app. The SwiftKey team is one of the many teams working on Android at Microsoft. We build the Microsoft SwiftKey AI Keyboard app for Android ("SwiftKey" from now on). SwiftKey is a keyboard app that lets you type by tapping on keys or sliding your finger over them, correcting and predicting what you type and learning from your typing. It supports over 700 languages (up to 6 of them at the same time) and it has an ever-increasing number of other features such as emoji, GIFs, clipboard and integration of new generative AI products like Copilot and Designer. As we evolve the product, we've made an effort to keep the app size small. SwiftKey's download size is currently around 20MB and its install size right after installation is around 55MB, although it increases over time. Size matters to our users and partners, who prefer apps that are as small as possible. It matters to us too, because apart from our wish to respect users' data and storage, if the app is bigger users are more likely to uninstall it and partnering with device manufactures is more difficult. We discussed app size at length in App size reduction at Microsoft SwiftKey. We've noticed that an increasing number of the latest feature proposals include some form of AI, i.e. they require some sort of probabilistic model that takes some data as input, does some processing, and returns some data as output. This AI is represented by a green box called "AI feature" in the diagrams to simplify. The box can include one or more models, the engine that processes the models and other related data they need to work as well, which can get quite big (usually due to the model(s) size) and may need to be handled carefully to avoid unnecessarily increasing the app size. How big does an AI feature n

## The Ultimate Guide to Developing High-Quality Android Libraries

DevFeed: [The Ultimate Guide to Developing High-Quality Android Libraries](<https://devfeed.tech/articles/the-ultimate-guide-to-developing-high-quality-android-libraries-22786.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/the-ultimate-guide-to-developing-high-quality-android-libraries-6cabca3ca277?source=rss----87f10537e947---4>)

Author: Akshay Bora

Published: 2024-12-04T08:27:06Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Android Library](<https://devfeed.tech/topics/android-library.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Library](<https://devfeed.tech/topics/library.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [development-process](<https://devfeed.tech/topics/development-process.md>), [Software Process](<https://devfeed.tech/topics/software-process.md>), [builds](<https://devfeed.tech/topics/builds.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-library](<https://devfeed.tech/tags/android-library.md>), [developer-documentation](<https://devfeed.tech/tags/developer-documentation.md>), [developing](<https://devfeed.tech/tags/developing.md>), [development-process](<https://devfeed.tech/tags/development-process.md>), [efficiently](<https://devfeed.tech/tags/efficiently.md>), [guide](<https://devfeed.tech/tags/guide.md>), [isolation](<https://devfeed.tech/tags/isolation.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library-design](<https://devfeed.tech/tags/library-design.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [playground](<https://devfeed.tech/tags/playground.md>), [practices](<https://devfeed.tech/tags/practices.md>), [quality](<https://devfeed.tech/tags/quality.md>), [reuse](<https://devfeed.tech/tags/reuse.md>)

### AI overview

The article recommends a development app to test library features in isolation, shorten build cycles, run UI tests, and provide integration examples. It also advises keeping APIs simple, documented, and encapsulated; marking unstable APIs experimental with opt-in; prefixing public resources to reduce naming collisions; and using Kotlin annotations such as @JvmStatic, @JvmField, @JvmName, and @JvmOverloads for Java interoperability. Further practices include limiting class visibility, choosing a versioning scheme with release notes and deprecation guidance, documenting transitive dependencies for AAR publication, modularizing UI, telemetry, and networking so consumers can select components, and using Gradle dependency locking. The text is prescriptive and does not compare these approaches or provide measured outcomes.

### Source excerpt

In the fast-paced world of software development, creating Libraries efficiently and effectively is crucial to ensure the code reuse across apps. Here are some preferred practices to help you streamline your Library development process and guide you towards unlocking the secrets of building a top-notch Android Library. In Microsoft we do use these guidelines while developing the Libraries like File Picker, Share and Calendar libraries which helped us big time. 1. Create a Playground/Development App When developing libraries, it is advantageous to create a playground or development application that integrates with the library for faster development cycles. This approach has proven highly beneficial, as developers no longer need to build an example Teams codebase to test the libraries, significantly reducing the time required for testing. This approach offers several benefits: Isolated Testing: Developers can test and develop features in isolation, without waiting for integration into the consumer codebase. This leads to faster development cycles. Shorter Build Times: The development app targets specific features, resulting in quicker builds. Developers can launch the feature they want to test with just a click. UI Testing: Run UI tests from the playground app, allowing the consumer or library to focus on integration tests. Feature-level UI tests can be handled in isolation. Easier Replacement: Replace actual implementations with fake ones for UI tests easily. Better Integration References: Provide better integration references in developer documentation and stakeholders to play around before consuming the Library. 2. Cleaner API Surface When developing high-quality Android libraries, it's crucial to maintain a clean and intuitive API surface. A cleaner API surface ensures that your library is easy to understand and use, which can significantly enhance the developer experience. Simplicity: Keep your API simple and avoid unnecessary complexity. Provide clear, concise me

## Scaling Mobile Development at Microsoft-- Mental Model

DevFeed: [Scaling Mobile Development at Microsoft-- Mental Model](<https://devfeed.tech/articles/scaling-mobile-development-at-microsoft-mental-model-22783.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/scaling-mobile-development-at-microsoft-mental-model-9e51241ea41a?source=rss----87f10537e947---4>)

Author: Anand Nath

Published: 2024-06-12T14:37:04Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Library](<https://devfeed.tech/topics/library.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [development](<https://devfeed.tech/tags/development.md>), [ios](<https://devfeed.tech/tags/ios.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [mobile-development](<https://devfeed.tech/tags/mobile-development.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [scaling](<https://devfeed.tech/tags/scaling.md>)

### AI overview

Microsoft's article proposes a shared architecture for reusable mobile components, called High Value Controls (HVCs), across apps with separate codebases and release cycles. A separately released common API layer gives HVCs shared interfaces for services such as networking, storage, logging, telemetry, and image loading, reducing redundant libraries and helping apps retain control of those services. HVCs implement an IHvc contract and receive an ApiService plus component-specific settings through HvcContract. An app-level Orchestrator creates HVC instances and can proxy service calls to attribute telemetry, measure usage and latency, or apply policies such as throttling. The design aims to improve integration consistency and monitoring while making HVCs easier to test. Android is the example technology; the article says the same reasoning applies to iOS. It presents a high-level approach and defers a practical example to a later article.

### Source excerpt

Scaling Mobile Development at Microsoft -- Mental Model In the Scaling Teams Mobile Development series we looked at scaling development in a single mobile code base. Since then, we were at work, looking at up-levelling this problem statement and look at how to scale across mobile applications. Here is a new series which tries to throw some light around this topic. This article is the first of a series, starting with understanding the problem statement and a high level solution. In the following articles we will dive deeper with an example and discuss practical aspects of how we got it done. Let's dive in! Photo by Hans-Peter Gauster on UnsplashShared experiences Microsoft has a suite of mobile applications. Each of these applications are developed in separate code base, has its own release cycles. There are a lot of overlapping experiences across these applications. These experiences are also implemented, tested and maintained independently in each application. Here are some examples: File picking experience across Microsoft mobile apps.Calendar experience across Microsoft mobile apps.File sharing experience across Microsoft mobile apps. In order to drive consistent user experience across these applications, Microsoft is invested in developing "High Value Controls" aka HVCs. For example, there is One Camera which provides camera functionality for most of the Microsoft apps, there is One Player which provides video playback in Microsoft apps and some more. Most of the HVCs are developed in silos without any common considerations or guidelines. Some HVCs are developed inside one of the Microsoft mobile apps and then lifted out to be positioned as reusable. These come with the remnants of the app specific concepts and logic, which does not sit well with other apps. This kind of HVC development lack consistency, coherence and interoperability. This also leads to a series of issues for both the Microsoft mobile apps and HVCs. Issues for Microsoft mobile apps Note: In this

## Spotting Latency Regressions Ahead of Time at Teams Mobile

DevFeed: [Spotting Latency Regressions Ahead of Time at Teams Mobile](<https://devfeed.tech/articles/spotting-latency-regressions-ahead-of-time-at-teams-mobile-22785.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/spotting-latency-regressions-ahead-of-time-at-teams-mobile-e0e5a5ef6390?source=rss----87f10537e947---4>)

Author: Saumye Srivastava

Published: 2024-02-02T18:18:47Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [Grafana](<https://devfeed.tech/topics/grafana.md>), [app startup](<https://devfeed.tech/topics/app-startup.md>), [Android](<https://devfeed.tech/topics/android.md>), [Mobile Testing](<https://devfeed.tech/topics/mobile-testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [dashboards](<https://devfeed.tech/tags/dashboards.md>), [database](<https://devfeed.tech/tags/database.md>), [grafana](<https://devfeed.tech/tags/grafana.md>), [latency](<https://devfeed.tech/tags/latency.md>), [measurement](<https://devfeed.tech/tags/measurement.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-testing](<https://devfeed.tech/tags/performance-testing.md>), [release](<https://devfeed.tech/tags/release.md>), [teams](<https://devfeed.tech/tags/teams.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [time](<https://devfeed.tech/tags/time.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>), [user-frustration](<https://devfeed.tech/tags/user-frustration.md>)

### AI overview

Teams Mobile measures critical scenario latency by recording start and stop times, with ScenarioContext carrying execution time, metadata, device information, status, steps, and a correlation ID. Telemetry from internal users, testers, canary and beta users, and early adopters is stored for analysis. Microsoft dashboards run queries every minute; the excerpt also suggests sending telemetry to an internal or third-party database and using Grafana. The data is intended to reveal regressions early, but latency graphs alone have led to late detection during rollouts and made causes difficult to pinpoint amid many code changes. The excerpt ends while describing release changes, so it does not provide the full proposed solution.

### Source excerpt

In the realm of mobile applications, subpar performance not only results in user frustration but also contributes to high user dissatisfaction scores (DSAT), a lower app Net Promoter Score (NPS), and increased uninstallations. Developers continually implement numerous code optimizations in each release, bringing about substantial improvements in App Vitals and critical user scenarios such as application launch, chat loading time, and channel loading time. Our Android codebase sees contributions from over 350 developers on a monthly basis, with a staggering 50+ commits merged into the mainline every day. The pace of innovation remains high, as we introduce more than 20 new features daily to our internal users across the organization and our partners. In this dynamic environment, the need to maintain optimal app performance is paramount, emphasizing the importance of identifying and mitigating latency issues before they have a chance to impact user experience. All code is guilty until proven innocent.-- Uncle BobScenario Measurement & Monitoring We employ a method called scenario telemetry to measure execution time at the beginning and end of critical usage scenarios of our app. The latency telemetry for all usage scenarios is recorded in our database along with user details. The ScenarioContext handle facilitates the transfer of context information related to a user scenario throughout the app, including execution time, metadata, device information, status, steps, and correlation ID. fun onCreate() { val scenarioContext = scenarioManager.startScenario(AppScenarioNames.App.APP_START_WARM_FIRST_DRAW); // do critical work, load screen scenarioManager.stopScenario(scenarioContext); } Creating dashboards at Microsoft is a straightforward process, involving crafting a query on our internal portal that our internal framework executes every minute to chart into graphs. You can send the usage telemetry to your internal or third party Database and host a Grafana instance for

## A Journey from Hackathon to Production

DevFeed: [A Journey from Hackathon to Production](<https://devfeed.tech/articles/a-journey-from-hackathon-to-production-22778.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/a-journey-from-hackathon-to-production-fc0c5c4aca2?source=rss----87f10537e947---4>)

Author: Chirayu Asati

Published: 2023-11-29T14:22:33Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Hackathon](<https://devfeed.tech/topics/hackathon.md>), [Product Management](<https://devfeed.tech/topics/product-management.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>)

Tags: [chat](<https://devfeed.tech/tags/chat.md>), [collaboration](<https://devfeed.tech/tags/collaboration.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [feature](<https://devfeed.tech/tags/feature.md>), [hack](<https://devfeed.tech/tags/hack.md>), [hackathon](<https://devfeed.tech/tags/hackathon.md>), [hackathons](<https://devfeed.tech/tags/hackathons.md>), [idea](<https://devfeed.tech/tags/idea.md>), [ideation](<https://devfeed.tech/tags/ideation.md>), [impact](<https://devfeed.tech/tags/impact.md>), [innovation](<https://devfeed.tech/tags/innovation.md>), [journey](<https://devfeed.tech/tags/journey.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [microsoft-teams](<https://devfeed.tech/tags/microsoft-teams.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [product](<https://devfeed.tech/tags/product.md>), [product-management](<https://devfeed.tech/tags/product-management.md>), [production](<https://devfeed.tech/tags/production.md>), [schedule](<https://devfeed.tech/tags/schedule.md>), [scheduler](<https://devfeed.tech/tags/scheduler.md>), [scheduling](<https://devfeed.tech/tags/scheduling.md>)

### AI overview

Scheduling a meeting from a Teams Mobile group chat took more than eight steps, so the hackathon idea aimed to reduce it to three. In moving toward production, the team worked with Product Management on a feature specification, adding a meeting "chiclet" card sent to participants when a meeting is created. The feature entered a backlog and was prioritized using RICE (Reach x Impact x Confidence / Effort). The excerpt also identifies design, engineering, and product as pillars of feature development, but cuts off before describing the process further.

### Source excerpt

Hey there, I am Chirayu and I'm taking you on the journey of transforming a mere idea into a fully-fledged, efficient feature that requires a compelling tale of innovation. I'm a Software Engineer at Microsoft Teams Mobile and I had the privilege of being part of this remarkable journey from the beginning. This story is not just about the technical process but the innovation, collaboration, and dedication of the teams to overcome challenges creating incredible impact. It all started when I was feeling too lazy and frustrated to schedule a meeting with folks in my hackathon group chat because I had to go to the meeting scheduler and search everyone by name, add them one by one and then schedule the meeting. Too hectic, isn't it? Is being lazy bad? No way, see this quote from the Gates. So, whenever we are lazy, we have an opportunity to make things easy for ourselves and the world. The Idea As described above, if you want to schedule a meeting while chatting in a group, you would have to: User flow to schedule a meeting from chat in Teams Mobile beforeUser flow to schedule a meeting from chat in Teams Mobile after As you can see in the above image, scheduling a meeting from chat takes 8+ steps in Teams Mobile so the idea is to reduce this to just 3 simple steps: This streamlined approach would save valuable time and simplify the process. This concept sparked the beginning of our journey. About Microsoft Global Hackathon Hackathon is a great way for ideation, innovation, collaboration & fun and Microsoft is renowned for its commitment to hackathons, conducting events like CodeFunDo in colleges and the Microsoft Global Hackathon for its employees. After demonstrating the potential of our hack, it was time to go down the road to turn it into a fully-fledged product feature accessible to millions of people on the planet. R.I.C.E. The initial phase of transitioning from a hack to a production-ready feature involves discussions with the Product Management team to craft a c

## Pull vs push architecture for Mobile

DevFeed: [Pull vs push architecture for Mobile](<https://devfeed.tech/articles/pull-vs-push-architecture-for-mobile-22782.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/pull-vs-push-architecture-for-mobile-6956d37c5869?source=rss----87f10537e947---4>)

Author: Abhishek Kharb

Published: 2023-10-10T13:33:07Z

Content type: tutorial

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [API](<https://devfeed.tech/topics/api.md>), [data](<https://devfeed.tech/topics/data.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [client](<https://devfeed.tech/topics/client.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [communication](<https://devfeed.tech/tags/communication.md>), [data](<https://devfeed.tech/tags/data.md>), [http](<https://devfeed.tech/tags/http.md>), [ios](<https://devfeed.tech/tags/ios.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [push-notification](<https://devfeed.tech/tags/push-notification.md>), [request](<https://devfeed.tech/tags/request.md>), [server](<https://devfeed.tech/tags/server.md>), [servers](<https://devfeed.tech/tags/servers.md>)

### AI overview

This article explains pull- and push-based architectures for keeping mobile application data synchronized with servers. It describes user-triggered requests, short polling, long polling, and server-initiated updates through socket connections or platform push frameworks.

### Source excerpt

What is pull vs push architecture for Mobile? Almost all mobile applications need to regularly sync data from servers to be able to show their users fresh information for consumption. Photo by Claudio Schwarz on Unsplash This data sync can be achieved in broadly two ways: 1. Pull based model -- The pull-based model requires apps to initiate an API call in order to fetch the latest data. This call is usually initiated by some user action defined by the programmer. It could be when a user navigates to a particular screen in the app or performs a particular action (like pull to refresh), or it could be based on the polling technique. Broadly, polling can be achieved in one of the two following ways: Short polling: Sometimes referred to as Regular polling or Standard polling, in this case the client makes an HTTP call to the server at regular intervals of time. As and when the data is available, the server returns the data back to the client, until then the server just sends the same old data or empty response depending upon the implementation. One of the major drawbacks of this technique is that since the data is refreshed at regular intervals by the client, it results in redundant calls when no new data is available and stale data if something changes on the server before the next call is made. Short polling-based mechanism for data sync. Long Polling: This technique aims to address the redundant calls made by the client in short polling that return no new data from the server. In this case, the client makes an HTTP call to the server, but the server doesn't immediately respond if there is no new data available. Instead, the server waits until new data is available (or until the request times out), after which the server responds with the data. As soon as the client receives data from the server (or after the request times out), it sends another request (or after a certain cool off period), and the same process is repeated. Long-polling based mechanism for data sync. 2

## Understanding & Assessing Visual Regression Testing

DevFeed: [Understanding & Assessing Visual Regression Testing](<https://devfeed.tech/articles/understanding-assessing-visual-regression-testing-22787.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/understanding-assessing-visual-regression-testing-4384529a8dd8?source=rss----87f10537e947---4>)

Author: Nikhita Reddy Eega

Published: 2023-07-27T12:58:43Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [visual-regression-testing](<https://devfeed.tech/topics/visual-regression-testing.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [screenshot-testing](<https://devfeed.tech/topics/screenshot-testing.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [2021](<https://devfeed.tech/tags/2021.md>), [about](<https://devfeed.tech/tags/about.md>), [approach](<https://devfeed.tech/tags/approach.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [based](<https://devfeed.tech/tags/based.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [building](<https://devfeed.tech/tags/building.md>), [can](<https://devfeed.tech/tags/can.md>), [cashapp-paparazzi](<https://devfeed.tech/tags/cashapp-paparazzi.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [changes](<https://devfeed.tech/tags/changes.md>), [code](<https://devfeed.tech/tags/code.md>), [compare](<https://devfeed.tech/tags/compare.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [components](<https://devfeed.tech/tags/components.md>), [facebook-sdk](<https://devfeed.tech/tags/facebook-sdk.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [regression](<https://devfeed.tech/tags/regression.md>), [regression-testing](<https://devfeed.tech/tags/regression-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>), [visual-regression-testing](<https://devfeed.tech/tags/visual-regression-testing.md>)

### AI overview

Visual regression testing compares a newly captured UI snapshot with a saved "Golden" baseline; the allowed pixel difference sets the regression threshold. During View-to-Compose migration, changes in framework and styling can alter details such as padding and margins. The excerpt compares two tools: Facebook SDK is instrumentation based, requires an emulator or device, and captures whole activities or individual Views. It captured a Compose activity but not individual composables in the described tests; the article also reports an obstacle with its storage permission on Android 11 and later. Paparazzi runs modular unit tests on the JVM without a device, uses layoutlib to render screenshots, and offers capture APIs for Views and composables. The tests showed component sizing inaccuracies, for which the excerpt mentions a workaround, and the tool's layoutlib dependency can require coordinated build-system updates. Paparazzi ran faster in the reported comparison, though the tools use different testing types.

### Source excerpt

Understanding & Evaluating Visual Regression TestingPhoto by Jessica Ruscello on UnsplashDive into learning about VRT tools like Facebook SDK, Paparazzi and study their compatibility for migration. Since Jetpack Compose was released in 2021, its declarative programming model has offered a modern and intuitive approach to building user interface. Compared to View system framework, Compose promotes cohesion and simplifies state-management. This framework is lightweight because the UI components are built using composable functions as separate building pieces. With this paradigm shift, boilerplate code is lessened, code reuse is encouraged, and the development process is made simpler. Migrating to Compose seems quite appealing. Will there be any regression if we migrate from one framework to another, though? Because Compose is still relatively new compared to the well-established View-based UI, there might be potential challenges faced during the migration period. What about visual regressions? Possible visual regressions can be encountered due to different UI frameworks, view configuration and styling approach. Styling and themes are usually defined in XML resource files which are applied to the views and then rendered. Whereas in Compose, these are programmatically defined in Kotlin and then takes advantage of efficient recomposition. These variances may result in changes to padding, margin, etc. Thus, to maintain a seamless transition and avoid any visual bugs going unreported, visual regression testing can be used. This ensures that the final UI is consistent to enhance user experience. Understanding Visual Regression Testing (VRT): Let us now break down the process into two design approaches -- High level and Low level High-Level Design Approach Consists of 2 steps: 1) Record -- Generating a snapshot and saving it as Golden (baseline/reference snapshot used to compare subsequent snapshots) 2) Verify -- Compares the two snapshots High level design flowLow-Level Design

## How Hydra Lab Empowers Microsoft Mobile Testing

DevFeed: [How Hydra Lab Empowers Microsoft Mobile Testing](<https://devfeed.tech/articles/how-hydra-lab-empowers-microsoft-mobile-testing-22781.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/how-hydra-lab-empowers-microsoft-mobile-testing-e4bd831ecf41?source=rss----87f10537e947---4>)

Author: TechHome

Published: 2023-07-26T04:12:12Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Mobile Testing](<https://devfeed.tech/topics/mobile-testing.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [mobile devops](<https://devfeed.tech/topics/mobile-devops.md>), [Azure DevOps](<https://devfeed.tech/topics/azure-devops.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Android](<https://devfeed.tech/topics/android.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>)

Tags: [2022](<https://devfeed.tech/tags/2022.md>), [acceptance](<https://devfeed.tech/tags/acceptance.md>), [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [appium](<https://devfeed.tech/tags/appium.md>), [azure](<https://devfeed.tech/tags/azure.md>), [azure-devops](<https://devfeed.tech/tags/azure-devops.md>), [cd](<https://devfeed.tech/tags/cd.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [ci](<https://devfeed.tech/tags/ci.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [community](<https://devfeed.tech/tags/community.md>), [compliance](<https://devfeed.tech/tags/compliance.md>), [contributing](<https://devfeed.tech/tags/contributing.md>), [control](<https://devfeed.tech/tags/control.md>), [hydra](<https://devfeed.tech/tags/hydra.md>), [lab](<https://devfeed.tech/tags/lab.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-testing](<https://devfeed.tech/tags/mobile-testing.md>), [testgpt](<https://devfeed.tech/tags/testgpt.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

Hydra Lab is an open-source framework for building a private mobile test cloud with REST APIs and DevOps integration. It is built on Appium, Espresso, Maestro, XCTest, and other runners, with device and test-task management. In Microsoft's setup, a center service runs as an Azure app service and exposes AAD OAuth-based APIs; Azure DevOps queues test jobs, and the center assigns agents and devices. Agents return results for viewing in the center's web interface. The framework is presented as a way to address trust, customization, cost, and device-sharing concerns associated with third-party testing platforms. To explore it, the text says to install Docker and ADB, run the provided uber image, and open the local portal. The authors also describe work in progress on LLM-assisted test analysis, case generation, and a SEE exploration cycle that extracts interactive elements, chooses actions, evaluates outcomes, and repeats. The supplied text does not establish that these AI capabilities are complete.

### Source excerpt

How Hydra Lab Empowers Microsoft Mobile Testing and Test Intelligence Hydra Lab: Intelligent Cloud Testing Made Easy -- microsoft/HydraLab (github.com) What is Hydra Lab? The following video could give you an overview of Hydra Lab on its functionality status and mission. https://medium.com/media/34f0f3cb9ff8eafe8b4c2c90e5d5fa30/href In other words, with Hydra Lab, you can build a private test cloud on your own which provides RESTful API service and support for DevOps system integration. In other words, it's like you can have a private self-manageable "Firebase Test Lab". Why we need Hydra Lab We open-sourced Hydra Lab under github.com/microsoft in 2022 Dec, and its open-source nature ensures better control and customization, removing the following concerns when it comes to the integration of cloud testing platform: [Credibility]: Is it okay to upload your debug app package to a 3rd party platform? Could we trust them? Is there a compliance requirement for using it? [Customization]: Does the 3rd party platform have the compatible real devices to run my test? Is cross-platform scenario supported? [Cost]: Is the pricing of those platforms affordable? [Community]: Could we plug in our devices to the cloud and share them across geos & teams? Hydra Lab is a free, customizable, credible framework built on top of Appium, Espresso, Maestro, XCTest, etc. It has been geared with test integration glue code and scalable designs and test lifecycle definition for further support of new runners and test intelligence. The Hydra Lab team put consistent effort in contributing to the mission of "Intelligent Cloud Testing Made Easy" and designing "Your Intelligent Test Cloud", we have built standardized CI and CD procedures in Azure DevOps with UT and API+E2E acceptance testing as quality gatekeepers and have shipped 27 stable releases so far. How Hydra Lab powers testing in Microsoft After integrating Hydra Lab into our procedures over the past two years, our in-house service now stream

## Ammunition in the war against Teams Android build time

DevFeed: [Ammunition in the war against Teams Android build time](<https://devfeed.tech/articles/ammunition-in-the-war-against-teams-android-build-time-22779.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/ammunition-in-the-war-against-teams-android-build-time-2736a9c280ad?source=rss----87f10537e947---4>)

Author: Saumye Srivastava

Published: 2023-05-03T10:08:11Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Android](<https://devfeed.tech/topics/android.md>), [Continuous integration](<https://devfeed.tech/topics/continuous-integration.md>), [gradle-plugin](<https://devfeed.tech/topics/gradle-plugin.md>), [Microsoft Teams](<https://devfeed.tech/topics/microsoft-teams.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apple](<https://devfeed.tech/tags/apple.md>), [apple-m1](<https://devfeed.tech/tags/apple-m1.md>), [build](<https://devfeed.tech/tags/build.md>), [builds](<https://devfeed.tech/tags/builds.md>), [ci](<https://devfeed.tech/tags/ci.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [developer-productivity](<https://devfeed.tech/tags/developer-productivity.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [macbook-pro](<https://devfeed.tech/tags/macbook-pro.md>), [max](<https://devfeed.tech/tags/max.md>), [microsoft-teams](<https://devfeed.tech/tags/microsoft-teams.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [modules](<https://devfeed.tech/tags/modules.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pipelines](<https://devfeed.tech/tags/pipelines.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [project](<https://devfeed.tech/tags/project.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [teams](<https://devfeed.tech/tags/teams.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

Microsoft Teams Android reduced average build time from 9-10 minutes to under 5 minutes through a set of measured build and workflow changes. Gradle task telemetry captured execution time alongside machine, environment and changed-module details to track regressions and improvements. Upgrading Gradle versions reportedly improved build time by 30-40%, though upgrades also brought API deprecations, lint breakages and plugin changes. Other measures included disabling unnecessary debug-build steps, adopting non-transitive R after changing 1,600 files (reducing APK size by 2.6 MB and incremental build time by 13%), using Gradle lazy APIs and normalizing task inputs for caching, and applying kapt only where needed. These and compiler and configuration improvements together yielded 10-15%. Moving from Intel Macs to M1 Max machines improved builds by about 50%, with hardware requiring a business case. Configuration cache remained under review because of plugin incompatibilities.

### Source excerpt

The mobile industry is an ever-evolving space, with new innovations and updates being introduced regularly. This means that the competition is fierce, and every day counts in shipping features and bug fixes. The time it takes to build an Android app is a crucial factor that impacts developer productivity, which in turn can affect the app's success. The percentage reduction in build time leads to percentage increase in shipping features and bug fixes. At Microsoft Teams Android, we understand this well and have been working relentlessly to improve our Android build time over the past quarter. Photo by Venti Views on Unsplash Our Android codebase comprises of 300+ modules that are contributed by hundreds of developers who run thousands of builds per day, both locally and in our Continuous Integration (CI) and Pull Request (PR) triggered pipelines. 1. Build Telemetry We aimed to start by setting a baseline for our build configuration and execution time on both the project and task levels. To do so, we collected telemetry from all developers in different environments and machines. We started with setting up build telemetry for each gradle task. For this we used TaskExecutionAdapter and BuildListener that sent build telemetry to our monitoring servers by listening via the Gradle.addListener API. Along with the gradle task execution time, we also sent device and development details, branch creation dates, cores, RAM, OS, and the list of modules changed. Shortened output format, {'Build_Time': 82, 'deviceId': '<>', 'modelName': 'MacBook Pro', 'modelIdentifier': 'MacBookPro18,2', 'processorName': 'Apple M1 Max', 'totalCores': '10 (8 performance and 2 efficiency)', 'memory': '32 GB', 'timezone': '+0530', 'task': 'preparekotlinbuildscriptmodel', 'taskData': '{}', 'os': 'Darwin', 'cleanBuild': False, 'totalTaskTime': 0, 'versionName': '1416/1.0.0.2023060799', 'modulesChanged': '["apps/teams", "common/beacon"]'} This helped us collect data and build monitoring on a daily basis

## Scaling Teams Mobile Development -- The Mental Model

DevFeed: [Scaling Teams Mobile Development -- The Mental Model](<https://devfeed.tech/articles/scaling-teams-mobile-development-the-mental-model-22784.md>)

Original publisher: [Read original article](<https://medium.com/microsoft-mobile-engineering/scaling-teams-mobile-development-the-mental-model-8224afb1e4ba?source=rss----87f10537e947---4>)

Author: Anand Nath

Published: 2023-03-03T02:22:43Z

Content type: article

Language: en

Sources: [Android@Microsoft](<https://devfeed.tech/sources/android-microsoft-medium.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [consumer](<https://devfeed.tech/tags/consumer.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [ios](<https://devfeed.tech/tags/ios.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-development](<https://devfeed.tech/tags/mobile-development.md>), [modularization](<https://devfeed.tech/tags/modularization.md>), [partner-integrations](<https://devfeed.tech/tags/partner-integrations.md>), [scaling](<https://devfeed.tech/tags/scaling.md>)

### AI overview

Teams mobile's direct partner integrations created tight coupling: each entry point (consumer) had to know each feature team (producer), requiring consumer updates as producers were added. The proposed model separates them with typed `Feature` interfaces, a central `Registry`, and a `Manager`. Producers register independently; consumers request a feature type through the manager, which gathers matching features, sorts and filters them, then returns them. This centralizes ordering, filtering, and monitoring while insulating consumers and letting producers work independently. In Teams terminology, the pattern maps Site to consumer, Contributor to producer, Contribution to feature, `ContributorRegistry` to producer registry, and `ContributionManager` to feature manager. The excerpt presents this as a practical adaptation of Producer-Consumer for coordinating partner teams in a shared codebase.

### Source excerpt

Scaling Teams Mobile Development -- The Mental Model In the article Scaling Teams Mobile Development -- Evolving the design pattern we explored how multiple partner teams working on a large code base can be streamlined by employing the contributor design pattern. I decided to write this article as a prequel. In this article we will discuss the problem statement in a more generic way and draw some parallels with popular design patterns. Photo by Xavi Cabrera on Unsplash We started with the following mission statement in mind: Make partner integrations with Teams mobile easier, well segregated, with clear protocols. Teams is a complex mobile application with a LOT of integration points. Partner teams surface their features through these entry points. The following image highlight few entry points available in Teams. Few entry points in Teams mobile app When we looked at the partner integration story in Teams codebase, it became evident that the whole integration story is a Producer-Consumer design pattern which is not implemented correctly. Producer -- Consumer deep coupling Here is the mental model that we built: Entry points are consumers of features and partner teams are producers of features. In the existing method, each partner team directly integrated with the entry point. This meant each consumer had to know the producers directly and when a new producer was added, the consumer had to be updated. This resulted in tight coupling. This is not a scalable model. N x N relationship between Producers and Consumers For the system to scale we need to decouple the producers and the consumers and build strong contracts between them. We wanted to safeguard changes to the consumer. At the same time, we wanted to make the producers independent and able to churn out their features fast. We also wanted to centralize control on producers and its features for deciding their ordering, filtering, enablement etc. So, we evolved this design pattern, where we define multiple Feature in