OkCredit’s average merchant transaction goes up by 30% after reducing ANR  |  Developer stories  |  Android Developers Skip to main content Essentials Build AI experiences Build AI-powered Android apps with Gemini APIs and more. Get started Get started Create your first app. Use Compose for UI and adaptive app development to support multiple device form factors. Hello, world! Developer Verification Adaptive apps Compose for UI AI-powered IDE Training Monetization with Play ↗️ Optimize by form factor Build apps that optimize the user experience on phones, tablets, foldables, cars, XR, and more. Phones, tablets, foldables Android for Cars Android TV Android XR Googlebook ChromeOS Wear OS Build by category Learn to build for your use case by following Google's prescriptive and opinionated guidance. Games Camera & media Social & messaging Health & fitness Productivity Enterprise apps Get the latest Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback. Latest updates Experimental updates Android Studio preview Jetpack & Compose libraries Wear OS releases Privacy Sandbox ↗️ Design & Plan Excellent Experiences Build the best experiences for your best users. Learn more UI Design Design a beautiful user interface using Android best practices. Design for Android Mobile Desktop experiences XR Headsets & XR Glasses AI Glasses Widgets Wear OS Android TV Android for Cars Architecture Design robust, testable, and maintainable app logic and services. Introduction Libraries Navigation Modularization Testing Kotlin Multiplatform Quality Plan for app quality and align with Play store guidelines. Overview Core value User experience Accessibility Technical quality Excellent Experiences Security Safeguard users against threats and ensure a secure Android experience. Overview Privacy Permissions Identity Fraud prevention Develop Gemini in Android Studio Your AI development companion for Android development. Learn more Get Android Studio Core areas Get the samples and docs for the features you need. Samples Multidevice support User interfaces Background work Data and files Connectivity All core areas ⤵️ Tools and workflow Use the IDE to write and build your app, or create your own pipeline. Write and debug code Build projects Test your app Performance Command-line tools Gradle plugin API Android Bench Device tech Write code for form factors. Connect devices and share data. Phones, tablets, foldables ChromeOS Android for Cars Android TV Android XR Wear OS Android Health Better Together All devices ⤵️ Libraries Browse API reference documentation with all the details. Android platform Jetpack libraries Compose libraries Google Play services ↗️ Google Play SDK index ↗️ Google Play Play Console Publish your app or game and grow your business on Google Play. Go to Play Console Learn more ↗️ Fundamentals Learn how to engage users, monitize, and secure your app. Play Monetization Play Integrity Play Policies Play Programs ↗️ Games Dev Center Develop and deliver games. Get tools, downloads, and samples. Overview Play Asset Delivery Play Games Services Play Games on PC Level Up guidelines All Play guides ⤵️ Libraries Browse API reference documentation with all the details. Play Feature Delivery Play In-app Updates Play In-app Reviews Play Install Referrer Google Play services ↗️ Google Play SDK index ↗️ All Play libraries ⤵️ Tools & resources Tools for publishing, promoting, and managing your app. Android App Bundles Brand & marketing Play Console APIs ↗️ Blog the Android Developer's Blog Read the latest Explore the authors → Explore categories Case Studies Real-world results from real-world users. Explore how different teams use our tools to achieve their goals. Events & Programs Get the details on upcoming webinars, workshops, meetups, and special initiatives designed to help you grow. Product News Stay in the loop with the latest updates, feature releases, and behind-the-scenes looks at how we’re evolving. Community Discover stories from our users, spotlight features, and the collaborative projects that bring us all together. How-tos From quick tips to deep-dive tutorials, these step-by-step guides are designed to help you work smarter and faster. / English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어 Android Studio Sign in Developer stories Essentials More Design & Plan More Develop More Google Play More Blog More Android Studio Latest Apps Xiaohongshu Play Store Cuvva - Compose Square - Compose Mikan MatchingAgent - tapple VLC - Android TV Djay2 VLC Concepts Duolingo - App Bundle Duolingo - Excellence Duolingo - Kotlin Google Home Google Duo Google Photos Reflectly redBus Tamedia Roblox Infinite painter Squid Evernote BeautyPlus Tinder Zillow iHeartRadio Hike Spiegel Online Glamour.de Noom El Mundo SayHi Chat Cornershop Twitter - App Bundle Twitter - Compose Twitter - Kotlin Monzo - CameraX Monzo - Compose Adobe Truecaller Tokopedia Alarmy SmartNews PlayKids Headspace Headspace App Excellence Mercari - Compose Microsoft Microsoft - CameraX Zomato Josh Lyft OkCredit Swiggy MyJio JioSaavn TikTok Futu ShareChat Games Netmarble - ADPF Pokemon TCG Pocket - Vulkan Mir 2 - Frame Pacing Library Kuro Games - Power Profiler ARM - ADPF NCSoft - ADPF Mediatek - ADPF Unisoc - ADPF Godot Engine - Vulkan Com2uS - Vulkan Diablo Immortal - Vulkan ray tracing KakaoGames - ADPF Com2uS - Google Play Games for PC Gameloft - Game Mode API Gameloft - ChromeOS War Robots Gameloft - Play Asset Delivery RV AppStudios CDPR Epic Games Electronic Arts 2K/Cat Daddy - AGDK 2K/Cat Daddy - Play Asset Delivery Spokko New State Mobile Devsisters Instant apps Marvel Strike Force Evino Galaxy Attack Ultimate Guitar Viki King Jam City Vimeo Build AI experiences Get started Get started Hello, world! Developer Verification Adaptive apps Compose for UI AI-powered IDE Training Monetization with Play ↗️ Optimize by form factor Phones, tablets, foldables Android for Cars Android TV Android XR Googlebook ChromeOS Wear OS Build by category Games Camera & media Social & messaging Health & fitness Productivity Enterprise apps Get the latest Latest updates Experimental updates Android Studio preview Jetpack & Compose libraries Wear OS releases Privacy Sandbox ↗️ Excellent Experiences Learn more UI Design Design for Android Mobile Desktop experiences XR Headsets & XR Glasses AI Glasses Widgets Wear OS Android TV Android for Cars Architecture Introduction Libraries Navigation Modularization Testing Kotlin Multiplatform Quality Overview Core value User experience Accessibility Technical quality Excellent Experiences Security Overview Privacy Permissions Identity Fraud prevention Gemini in Android Studio Learn more Get Android Studio Core areas Samples Multidevice support User interfaces Background work Data and files Connectivity All core areas ⤵️ Tools and workflow Write and debug code Build projects Test your app Performance Command-line tools Gradle plugin API Android Bench Device tech Phones, tablets, foldables ChromeOS Android for Cars Android TV Android XR Wear OS Android Health Better Together All devices ⤵️ Libraries Android platform Jetpack libraries Compose libraries Google Play services ↗️ Google Play SDK index ↗️ Play Console Go to Play Console Learn more ↗️ Fundamentals Play Monetization Play Integrity Play Policies Play Programs ↗️ Games Dev Center Overview Play Asset Delivery Play Games Services Play Games on PC Level Up guidelines All Play guides ⤵️ Libraries Play Feature Delivery Play In-app Updates Play In-app Reviews Play Install Referrer Google Play services ↗️ Google Play SDK index ↗️ All Play libraries ⤵️ Tools & resources Android App Bundles Brand & marketing Play Console APIs ↗️ the Android Developer's Blog Read the latest Explore the authors → Explore categories Case Studies Events & Programs Product News Community How-tos Android Developers Essentials Developer stories OkCredit’s average merchant transaction goes up by 30% after reducing ANR Stay organized with collections Save and categorize content based on your preferences. OkCredit is a credit account management app for millions of shop owners and their customers in India. With 140M transactions month over month, and 50M+ downloads, last year alone saw OkCredit recording $50 billion worth of transactions on the app. Considering the scale that OkCredit operated in, and the millions of businesses that depend on its app for managing their accounts, it is imperative that OkCredit ensures a smooth and seamless experience for all its users, irrespective of the device they are using. Users reward the best performing apps with positive reviews and high ratings. An app that has stability or performance issues often leads to frustration and even worse, bad ratings. This makes ANRs (Application Not Responding) an important performance metric to track if you’re aiming to delight your users and give them a consistently good user experience. OkCredit’s investments in improving Android Vitals, like reducing ANR and improving app startup time led them to reap dividends, especially on low-end devices (which are already resource limited). They saw both improvements in customer retention as well as merchant transactions on the app. The Challenge One of the key segments for OkCredit were users on low-end devices. These devices are resource limited and running taxing tasks on them can easily create a sub-optimal user experience. For example, a major maintenance challenge was tracking and adding instrumentation for ANRs. The goal was to address these issues with the aim of improving the overall user experience and increasing merchant transactions. What did they do? Reducing ANR and improving app startup times for an app like OkCredit meant happy customers and moreover an increase in merchant transactions on the app. The most important clue in debugging an ANR is finding out what the main thread was doing when the ANR happened. Working with feedback from Google, OkCredit created a structured approach for identifying these ANRs. Monitored performance using Android Vitals and used custom reporting on Firebase Crashlytics to learn about ANRs Optimized initialization of third party libraries from App start, by moving these to a background thread Used tools like Systrace and Profiler to identify ANRs in broadcast receivers and Services. Macrobenchmark on CI also helped benchmark cold startups. Using method profiler, objects were identified to be loaded lazily. Using perfetto, high inflation layouts were identified. ANR in shared preferences were solved by changing all apply() to commit() in a background thread. The above tasks were validated to confirm their impact by comparing metrics or using tools such as systrace, CPU profiler etc. The Results Beyond improving metrics and the user experience, the OkCredit development team gained insights that helped them improve their development process going forward. On low-end devices - Reduced ANR by 60% Improved Day 1 customer retention of low-end devices by about 22% The average transaction for each merchant increased by 30% Improved app rating from 4.3 to 4.6 on the Play Store Cold startup time improved by ~70% Saw 60 % improvement in user click to full draw of first frame on any screen This exercise has brought the team together to create best practices and encouraged them to focus on improving the user experience. The team has started using tools like Perfetto and CPU profiler during development itself in order to improve their understanding of the system and make decisions faster. “Focusing on reducing ANRs has helped us differentiate ourselves by offering a delightful experience. This has led to increased retention, and reduced churn. Additionally, due to the teams’ engineering excellence, practices such as these have a profound influence on organization's culture. This makes us proud as a team, and company setting new benchmarks of app performance in the nascent Indian SMB digitisation industry.” – Gaurav Kunwar (Cofounder & CPO - OkCredit) Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2022-04-13 UTC. [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-04-13 UTC."],[],[]] X Follow @AndroidDev on X YouTube Check out Android Developers on YouTube LinkedIn Connect with the Android Developers community on LinkedIn More Android Android Android for Enterprise Security Source News Blog Podcasts Discover Gaming Machine Learning Health & Fitness Camera & Media Privacy 5G Android Devices Large screens Wear OS ChromeOS devices Android for cars Android TV Releases Android 17 Android 16 Android 15 Android 14 Android 13 Android 12 Android 11 Documentation and Downloads Android Studio guide Developers guides API reference Download Studio Android NDK Support Report platform bug Report documentation bug Google Play support Join research studies Android Chrome Firebase Google Cloud Platform All products Privacy License Brand guidelines Manage cookies Get news and tips by email Subscribe English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어