# OkCredit

Mobile Udhar Khata for small businesses in India - 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.

## OkLayoutInflater: Improving Android XML Layout Inflation with Parallel Coroutines

DevFeed: [OkLayoutInflater: Improving Android XML Layout Inflation with Parallel Coroutines](<https://devfeed.tech/articles/oklayoutinflater-37405.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/oklayoutinflater-3c5cd93c6ebc?source=rss----40ea5327aac7---4>)

Author: Anjal Saneen

Published: 2022-10-26T01:27:02Z

Content type: tutorial

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [XML](<https://devfeed.tech/topics/xml.md>), [Code](<https://devfeed.tech/topics/code.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [IO](<https://devfeed.tech/topics/io.md>), [callback](<https://devfeed.tech/topics/callback.md>), [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [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>), [anr](<https://devfeed.tech/tags/anr.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [file](<https://devfeed.tech/tags/file.md>), [io](<https://devfeed.tech/tags/io.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [memory](<https://devfeed.tech/tags/memory.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This tutorial explains how OkLayoutInflater addresses limitations in AndroidX AsyncLayoutInflater. It describes the existing implementation's sequential background inflation and presents a coroutine-based approach intended to use parallelism based on CPU cores, helping recycler view items load and scroll faster.

### Source excerpt

The loading of large XML layouts is one of the major performance bottlenecks in android. Loading XML layout into memory through IO operations and parsing views through reflection can be expensive. This is especially true when the XML file is too large or when initializing the layout view takes a while. We know that when the main thread performs some time-consuming operations, it may cause the page to freeze, and even more, serious ANR may occur. Androidx AsyncLayoutInflater helps to load those layouts asynchronously. However, we found that it has some limitations. The goal of this blog post is to explain how OkLayoutInflater addresses these limitations. Source code analysis of AndroidX AsyncLayoutInflater https://android.googlesource.com/platform/frameworks/support/+/89f7eba/v4/java/android/support/v4/view/AsyncLayoutInflater.java Source code is short and easy to understand with only a few lines of code. In the inflate method, it creates an InflateRequest object and stores variables such as resid, parent, callback, etc. Then it calls enqueue to add the request to the InflateThread queue. The main purpose of InflateThread is to add requests to the blocking queue and perform BasicInflater.inflate operations in order. Regardless of inflating success or failure, the request message will be sent to the main thread for processing. The BasicInflater Inherited from LayoutInflater. In OnCreateView these prefixes are loaded on the layout. At last, mHandlerCallback implements handleMessage which executes the operation on main thread, and there is a fallback mechanism, that is when the child thread inflates fails. it will continue to inflate on the main thread, and finally, gives a callback to the main thread through the OnInflateFinishedListener interface. The limitations of AsyncLayoutInflater and how we improve it Single thread to do all the inflate work AsyncLayoutInflater has this major limitation. This was the main reason for creating a custom implementation. One of our r

## Comparing Jetpack Compose performance with XML

DevFeed: [Comparing Jetpack Compose performance with XML](<https://devfeed.tech/articles/comparing-jetpack-compose-performance-with-xml-37398.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/comparing-jetpack-compose-performance-with-xml-9462a1282c6b?source=rss----40ea5327aac7---4>)

Author: Pratham Arora

Published: 2022-08-09T05:41:24Z

Content type: comparison

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [XML](<https://devfeed.tech/topics/xml.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-performance](<https://devfeed.tech/tags/compose-performance.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [performance](<https://devfeed.tech/tags/performance.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

In production builds with R8 and Compose 1.1.0, an A/B test of one transaction screen found Compose had fewer slow frames than XML (8.91% vs. 9.93%) but more frozen frames (0.044% vs. 0.034%) and took about 2.5 times as long to draw its first frame. A follow-up test suggests prior loading of Compose components improved the observed screen's performance: the excerpt reports roughly 70% fewer frozen frames and 35% shorter median page load duration after preloading, though it omits the individual second-experiment measurements. The authors attribute the initial delay to Compose components being compiled just in time and ART pre-compiling them for later use. Frame durations were measured with FrameMetricsAggregator; frozen frames were 700 ms or more and slow frames 16 ms or more.

### Source excerpt

As Jetpack compose is progressing towards stability, our team decided to measure the performance differences between Compose and XML-based layouts to build the foundation for gradually moving towards Jetpack compose. The differences were measured in terms of frozen frames, slow frames and page load duration. Additionally, we deep-dived into how Android Runtime (ART) optimises the performance by using Ahead-of-time (AOT) compilation. Both the below-mentioned experiments were performed on Production build with R8 enabled. Compose version used throughout was 1.1.0 Let's get started... Experiment -- 1 To begin with, we decided to convert one of the existing screens from XML to compose. Then, using our internal A/B experimentation platform, we made 2 equal cohorts/groups of users. The first cohort would experience the old XML-based screen whereas the other cohort would experience the newly compose built screen. Aim -- To understand the rendering performance of both the screens by comparing frozen frame rate, slow frame rate and page load duration. Screen -- This screen shows all the transactions as well as their summary in an interval. Results - Frozen frame percentage: For compose-based layout, the frozen frame rate came out to be 0.044% whereas it was 0.034% for XML-based layout. An alternate way to understand this can be, that if we open this XML-based activity, then nearly 3.4 frames out of 10,000 frames would fall under the frozen frame category. Similarly, for the compose-based activity, it would be 4.3 frames out of 10,000 frames. Slow frame percentage: For compose-based layout, the slow frame rate came out to be 8.91% whereas it was 9.93% for XML-based layout. Like frozen frames, ~10 out of 100 frames would fall under the slow frame category for XML-based layout. Whereas it was ~9 out of 100 frames for compose-based activity. Median Page Load Duration (in milliseconds): Internally, we define page load duration as the time taken from launching an activity to drawing it

## How OkCredit android app improves UX writing by changing strings on the fly (and you can too!)

DevFeed: [How OkCredit android app improves UX writing by changing strings on the fly (and you can too!)](<https://devfeed.tech/articles/how-okcredit-android-app-improves-ux-writing-by-changing-strings-on-the-fly-and-you-can-too-37401.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/how-okcredit-android-app-improves-ux-writing-by-changing-strings-on-the-fly-and-you-can-too-8f38da8e69b9?source=rss----40ea5327aac7---4>)

Author: Rashanjyot Singh

Published: 2022-07-13T06:31:23Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [product-experimentation](<https://devfeed.tech/topics/product-experimentation.md>), [User Experience](<https://devfeed.tech/topics/user-experience.md>), [Internationalization (i18n)](<https://devfeed.tech/topics/i18n.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [all](<https://devfeed.tech/tags/all.md>), [amazing](<https://devfeed.tech/tags/amazing.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-library](<https://devfeed.tech/tags/android-library.md>), [app](<https://devfeed.tech/tags/app.md>), [apps](<https://devfeed.tech/tags/apps.md>), [aspect](<https://devfeed.tech/tags/aspect.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [build](<https://devfeed.tech/tags/build.md>), [business](<https://devfeed.tech/tags/business.md>), [can](<https://devfeed.tech/tags/can.md>), [change](<https://devfeed.tech/tags/change.md>), [changes](<https://devfeed.tech/tags/changes.md>), [class](<https://devfeed.tech/tags/class.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fly](<https://devfeed.tech/tags/fly.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [strings](<https://devfeed.tech/tags/strings.md>), [ux](<https://devfeed.tech/tags/ux.md>), [ux-writing](<https://devfeed.tech/tags/ux-writing.md>), [writing](<https://devfeed.tech/tags/writing.md>)

### AI overview

OkCredit used the open-source Android library Philology to serve replacement strings through the usual `Resources.getString(...)` calls, while leaving XML resources unchanged. Philology intercepts view inflation and lets a custom repository provide a value for a string key or return null to use the XML value; OkCredit connected that data source to its in-house A/B testing setup. In an English-language cohort, an experiment targeting about 60,000 users for about 10 days found a 1.7% increase in user activation for the test variant over control. The authors report stable use over two years, but note a resource interception issue with `androidx.appcompat:appcompat:1.2.0` and warn that Philology and its ViewPump dependency were not actively maintained when they wrote the article. They mention Restring as a seemingly more actively maintained alternative, but had not evaluated it.

### Source excerpt

How OkCredit Android App improves UX writing by changing strings on the fly (and you can too!)Foreword⚠ First things first! We don't want to make any false claims, and to tell you straight off, you cannot update the strings stored as XML resources in your android app. However, we are here to tell you how we achieved that effect in OkCredit android app by using 'Philology', an open-source android library. OkCredit is a digital ledger app used by millions of small business owners and their customers daily to facilitate the recording of credit/payment transactions digitally all over India. The app supports over 11 different languages and to cater to such a diverse userbase, one key aspect is to communicate effectively. A pain point often shared by our product managers and language localization teams was that each time we wanted to experiment with strings, change/update them or make changes to translations of specific languages, we had to release a new version of the app. Hence, we wanted to have a setup that would enable us to experiment with strings faster and update them on the fly without releasing a new version of the app. Let's Get Started Like most apps, OkCredit app uses a lot of XML string resources, and an ideal implementation to set up string experimentation would be one that requires the bare minimum amount of changes in the way we conventionally fetch strings, which is using getString(...) method of the Resources class. The android developer community is amazing and that's what we realized yet again when we instantly found exactly what we needed. We figured out quite a few technical blogs and a couple of open-source libraries that explained the underlying mechanism well (hence, we won't do that much herein and simply share the relevant links). However, to build conviction that it could run flawlessly at scale, we needed to pilot the solution first-hand. After using it for numerous experiments to improve the experience for millions of our users, with this b

## How OkCredit Android App boosted Network Performance by 30%

DevFeed: [How OkCredit Android App boosted Network Performance by 30%](<https://devfeed.tech/articles/how-okcredit-android-app-boosted-network-performance-by-30-37400.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/how-okcredit-android-app-boosted-network-performance-by-30-84109080c065?source=rss----40ea5327aac7---4>)

Author: Shrey Garg

Published: 2022-07-07T11:29:22Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [Latency](<https://devfeed.tech/topics/latency.md>), [Android](<https://devfeed.tech/topics/android.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [real user monitoring](<https://devfeed.tech/topics/real-user-monitoring.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>), [Domain Name System (DNS)](<https://devfeed.tech/topics/dns-resolution-process.md>), [QUIC](<https://devfeed.tech/topics/quic.md>), [TLS handshake](<https://devfeed.tech/topics/tls-handshake.md>), [TTL in DNS](<https://devfeed.tech/topics/ttl-in-dns.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [dns](<https://devfeed.tech/tags/dns.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [network](<https://devfeed.tech/tags/network.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [performance](<https://devfeed.tech/tags/performance.md>), [tls](<https://devfeed.tech/tags/tls.md>)

### AI overview

OkCredit reports that client-side changes improved average network-call time by about 30%, with a 70% improvement from connection start to connection acquisition. The article recommends using OkHttp's EventListener to time individual call stages and sampling production users to capture differences across networks, regions, devices, and app states; callbacks should stay lightweight and perform I/O asynchronously. Suggested changes include sharing one OkHttp instance to reuse its connection pool, tuning pool limits and keep-alive duration while avoiding resource waste, and avoiding I/O in interceptors. It also discusses reducing hostnames to limit DNS work and adjusting DNS TTLs. For connection acquisition, it describes QUIC as a potential option but says OkHttp did not support it at the time, suggesting Cronet as an alternative. The excerpt lists other possible actions, including API latency fixes, pagination, compression, caching, and converter choices.

### Source excerpt

Fast and reliable network communication is crucial for OkCredit mobile apps. Since the majority of our users belong to Tier-2/3 cities in India, flaky and unreliable network connection is one of the biggest challenges for us. In order to deliver a good user experience, our mobile apps need to have reliable and low-latency network connectivity. While most resources we found describe how we can improve the overall time (start-end) of a network call, this article attempts to take a deep dive and talk about each step and how we can instrument and optimise each step of a network call in android apps. Steps involved in a network callFig. Steps of a Network call. Ref -- https://square.github.io/okhttp/features/events1. Call start Called as soon as a call is enqueued or executed by a client. Ideally, this step should not consume any time unless there are any custom Interceptors added. 2. DNS Involves the DNS Resolver translating the domain name into the corresponding identifier (the IP address). 3. Connection Start Tries to acquire a secure connection (TLS handshake) between the client and the server. 4. Connection End / Acquired Invoked after a connection has been acquired for the call. After this, the communication of request and response payloads is started. 5. Request / Response / Headers This is the step in which the actual communication of data happens. The HTTP method, size of request / response payload, server latency / response time, etc. can greatly impact the time taken by this step. 6. Connection released Invoked after a connection has been released for the call. 7. Call end Invoked immediately after a call has completely ended. Pooled connection OkHttp has the capability to pool connections with which it can skip various steps of a network call mentioned above, which in turn can greatly improve the application's network performance, as existing connections can be reused. Fig. Steps of a Network call with pooled connectionInstrumentation of each step To determine

## Screen response time. A critical metric for user experience

DevFeed: [Screen response time. A critical metric for user experience](<https://devfeed.tech/articles/screen-response-time-a-critical-metric-for-user-experience-37406.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/screen-response-time-a-critical-metric-for-user-experience-fc2be922859f?source=rss----40ea5327aac7---4>)

Author: Anjal Saneen

Published: 2022-06-27T06:10:37Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [mobile optimization](<https://devfeed.tech/topics/mobile-optimization.md>), [User Experience](<https://devfeed.tech/topics/user-experience.md>), [Interaction to Next Paint](<https://devfeed.tech/topics/interaction-to-next-paint.md>), [lazy loading](<https://devfeed.tech/topics/lazy-loading.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [constraintlayout](<https://devfeed.tech/topics/constraintlayout.md>), [Core Web Vitals](<https://devfeed.tech/topics/core-web-vitals.md>)

Tags: [about](<https://devfeed.tech/tags/about.md>), [addition](<https://devfeed.tech/tags/addition.md>), [all](<https://devfeed.tech/tags/all.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-vitals](<https://devfeed.tech/tags/android-vitals.md>), [app](<https://devfeed.tech/tags/app.md>), [better](<https://devfeed.tech/tags/better.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [critical](<https://devfeed.tech/tags/critical.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [experience](<https://devfeed.tech/tags/experience.md>), [metric](<https://devfeed.tech/tags/metric.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [screen](<https://devfeed.tech/tags/screen.md>), [time](<https://devfeed.tech/tags/time.md>), [user](<https://devfeed.tech/tags/user.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

OkCredit defines screen response time as the interval from a screen-opening tap to its first frame and argues for measuring it because Android vitals report slow and frozen frames but do not capture the full responsiveness picture. The article describes XML loading costs (I/O, parsing, reflective View creation, then measure/layout/draw) and says Compose avoids those costs but loads its classes on first use, making the first Compose screen slower than subsequent ones. It recommends aiming for 100 ms or less and profiling before optimizing. Reported steps include asynchronous inflation (which OkCredit says cut screen load time 25% and frozen-frame performance 30%), flattening layouts, moving long work off the main thread, lazy initialization, and Compose R8/baseline-profile checks. Custom views can reduce hierarchy and traversal costs but are harder to maintain; X2C may bring integration and APK-size costs. OkCredit reports that targeting 100 ms also reduced frozen frames by 40%, while cautioning that performance work should be iterative and stop when gains no longer justify effort.

### Source excerpt

A high-quality user experience is always a top priority at OkCredit. We aim to make the mobile app as fast as possible. To better understand performance impact, we measure various L1 and L2 metrics. Among them, a key metric is screen response time. The time it takes the user to reach the first frame of the screen after clicking for opening a screen. Screen response time is a core web metric for web pages. In addition, Google recently introduced a new metric for assessing full-page responsiveness on the web called Interaction to Next Paint. Android vitals are far behind in terms of measuring responsiveness metrics compared to the web. You can watch the state of responsiveness on the web here. Playstore vitals measure frozen frames and slow frames, but they don't tell the whole story about the responsiveness of the app. In order for your app to be responsive, you must derive multiple metrics yourself. We share our learnings and findings on-screen response time in this blog post. How the screens loads Let me explain briefly how a screen loads on Android before we move on to the metric. For optimal screen load, it's important that you understand all the operations that occur there. Please keep in mind the term Screen in Android terms as referring to a fragment or activity. We demonstrate the XML and jetpack compose individually below. XML We must first understand the principle of XML layout loading, If you dig deep into the Android source code of Activity.setContentView, each layout must go through inflation before it can pass the measure and be drawn. XML Layout load to draw Phases 1. Load and parse the XML file loadXmlResourceParser is the method responsible for loading an XML file. We wouldn't need to go into the implementation details of this method, we just need to know that it reads the XML file we wrote into memory, and performs some data parsing and encapsulation. Therefore, this is a method that requires I/O. As we know, I/O operations are typically more comput

## How we reduced our ANR by three times

DevFeed: [How we reduced our ANR by three times](<https://devfeed.tech/articles/how-we-reduced-our-anr-by-three-times-37402.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/how-we-reduced-our-anr-by-three-times-d9ae0b41ad94?source=rss----40ea5327aac7---4>)

Author: Anjal Saneen

Published: 2022-05-24T05:19:21Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Android](<https://devfeed.tech/topics/android.md>), [app startup](<https://devfeed.tech/topics/app-startup.md>), [digital experience monitoring](<https://devfeed.tech/topics/digital-experience-monitoring.md>), [aosp](<https://devfeed.tech/topics/aosp.md>), [code analysis](<https://devfeed.tech/topics/code-analysis.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [anr](<https://devfeed.tech/tags/anr.md>), [background](<https://devfeed.tech/tags/background.md>), [case-study](<https://devfeed.tech/tags/case-study.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [google-i-o](<https://devfeed.tech/tags/google-i-o.md>), [input](<https://devfeed.tech/tags/input.md>), [mobile-app-performance](<https://devfeed.tech/tags/mobile-app-performance.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [performance](<https://devfeed.tech/tags/performance.md>), [production](<https://devfeed.tech/tags/production.md>), [source-code](<https://devfeed.tech/tags/source-code.md>), [stack](<https://devfeed.tech/tags/stack.md>), [startup](<https://devfeed.tech/tags/startup.md>), [what-is](<https://devfeed.tech/tags/what-is.md>)

### AI overview

The article links Android ANRs to stalled input handling, slow background startup, main-thread work, lock contention, SharedPreferences writes, and garbage-collection waits. It explains that ANRs are hard to diagnose in production: Play Console traces can be delayed, missing, or poorly grouped, while Firebase exposes exit traces only on Android 11+ and supports breadcrumbs. The authors use an ANR watchdog to capture main-thread stalls and recommend profiling cold startup, keeping heavy work off the main thread, and examining blocked-thread traces for locks. In their app, optimizing startup helped address background service and broadcast timeouts; they also moved SharedPreferences commits to a background thread and used LeakCanary to investigate memory issues. They report a 0.03% Play vitals ANR metric and continued difficulty resolving all cases. The opening separately claims a 60% ANR improvement and 70% cold-start improvement.

### Source excerpt

App not responding is one of the most frustrating experiences for users. The user is stuck with an app that is hung and must terminate it. It is ridiculously difficult to observe and fix ANR for the android app in production due to their indeterministic nature. After studying stack traces of ANR, we were able to improve ANR by 60%, as well as cold startup performance by 70%. We've also been featured on Google I/O and the Android developer's blog has covered our ANR case study. The goal of this blog post is to discuss our learnings about ANR, challenges around solving ANR, how we track ANRs, an analysis of the source code of ANR generation, and some interesting ANRs that we found and how we resolved them. What is ANR A certain period of time needs to be allowed for the Android system to process events. As soon as the processing times out, an ANR dialogue appears, allowing the user to choose to wait or terminate the application immediately. To discover ANR, Android implements a set of sophisticated mechanisms at the system level. ANR can be classified into various categories. According to the background/foreground of the App, each category has a different timeout. InputDispatching Timeout(5s): A major reason for this is that the button or input event does not respond within a specific period of time. On Android, the timeout is set at 5 seconds by default. Broadcast Timeout (10s): If the broadcast receiver fails to complete its processing within the specified time, the broadcast timeout message is reported (foreground timeout is 10 seconds, background timeout is 60 seconds). Service Timeout (20s): The service does not complete the processing within the specified timeframe (foreground timeout is 20 seconds, background timeout is 200 seconds). User experience is directly affected by ANR since it forces the user to stop using the application through an automated dialogue. However, in the background, this dialogue will not be shown to the user, instead, the app is silently

## Digital payments are surging in informal BNPL; Under Rs 200 payments lead the surge

DevFeed: [Digital payments are surging in informal BNPL; Under Rs 200 payments lead the surge](<https://devfeed.tech/articles/digital-payments-are-surging-in-informal-bnpl-under-rs-200-payments-lead-the-surge-37399.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/digital-payments-are-surging-in-informal-bnpl-under-rs-200-payments-lead-the-surge-394330b8eff3?source=rss----40ea5327aac7---4>)

Author: Team OkCredit

Published: 2022-05-23T11:27:01Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [digital](<https://devfeed.tech/topics/digital.md>), [QR Code](<https://devfeed.tech/topics/qrcode.md>), [data](<https://devfeed.tech/topics/data.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>)

Tags: [bnpl](<https://devfeed.tech/tags/bnpl.md>), [digital](<https://devfeed.tech/tags/digital.md>), [digital-payment](<https://devfeed.tech/tags/digital-payment.md>), [payments](<https://devfeed.tech/tags/payments.md>), [qr-code](<https://devfeed.tech/tags/qr-code.md>), [retail](<https://devfeed.tech/tags/retail.md>), [small](<https://devfeed.tech/tags/small.md>), [store](<https://devfeed.tech/tags/store.md>), [upi](<https://devfeed.tech/tags/upi.md>)

### AI overview

The article examines digital payment adoption among informal businesses using OkCredit data and customer examples. It reports that UPI, especially QR-code payments, is widely used for small transactions, while cash remains significant.

### Source excerpt

Photo by David Dvořáček on Unsplash Prior to 2019, the biggest pain in Nitesh Bansal's life was getting customers to pay their dues. Bansal runs a Kirana cum mobile recharge store at Surat in Gujarat. Customers would keep on buying things at his store over and above an existing credit line, inflating the dues. " The typical excuses would be- "Forgot cash at home", "Settle the current bill, will pay the dues later" , "Don't have change" etc. In June 2019, Bansal latched on to one of the UPI platforms and since then things have changed. Digital payments have made his life a lot easier, by making credit settlements fuss-free. His customers now scan the QR code or pay him via Paytm. That doesn't mean he has gone completely digital; 60% of the payments at his store still happen in cash- a reality that has also been reflected in OkCredit's data UPI and within that QR codes have been the heroes of this digital revolution. Be it the neighbourhood vegetable vendor or the street food hawker, it isn't uncommon to find QR codes pasted on their shops and carts. The sheer convenience of scanning a code rather than looking for change or navigating through multiple apps makes QR codes a clear favourite among small and micro businesses. In fact, 90% of online payments happening on OkCredit take place through UPI, giving it a significant lead over all other forms of payments. While convenience is the primary reason, it has also been seen that shops that accept digital payments have a better control on cashflows than those who don't. Three shops away from Bansal's store, Ajay Sirohi's "Beena recharge point" suffers regularly because of non-paying customers. Despite several customers requesting him to add digital payments at the store, Sirohi hasn't done it for fear of cyber frauds. Payments are always an issue at his store, forcing him to resort to borrowing from his friends. Interestingly, for shops accepting digital payments, smaller denomination transactions are mostly happen throu

## No more chasing jobs, graduates are turning shopkeepers-OkCredit Insights

DevFeed: [No more chasing jobs, graduates are turning shopkeepers-OkCredit Insights](<https://devfeed.tech/articles/no-more-chasing-jobs-graduates-are-turning-shopkeepers-okcredit-insights-37403.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/no-more-chasing-jobs-graduates-are-turning-shopkeepers-okcredit-insights-1e6c7d218bd6?source=rss----40ea5327aac7---4>)

Author: Team OkCredit

Published: 2022-05-23T09:16:53Z

Content type: article

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [Tool](<https://devfeed.tech/topics/tool.md>), [To-Do](<https://devfeed.tech/topics/todo.md>)

Tags: [apps](<https://devfeed.tech/tags/apps.md>), [business](<https://devfeed.tech/tags/business.md>), [covid-19](<https://devfeed.tech/tags/covid-19.md>), [customer-experience](<https://devfeed.tech/tags/customer-experience.md>), [digital-bookkeeping](<https://devfeed.tech/tags/digital-bookkeeping.md>), [education](<https://devfeed.tech/tags/education.md>), [graduates](<https://devfeed.tech/tags/graduates.md>), [india](<https://devfeed.tech/tags/india.md>), [jobs](<https://devfeed.tech/tags/jobs.md>), [kirana](<https://devfeed.tech/tags/kirana.md>), [okcredit](<https://devfeed.tech/tags/okcredit.md>), [retail](<https://devfeed.tech/tags/retail.md>), [small-businesses](<https://devfeed.tech/tags/small-businesses.md>), [technology](<https://devfeed.tech/tags/technology.md>), [unemployment](<https://devfeed.tech/tags/unemployment.md>)

### AI overview

OkCredit argues that unemployment during Covid-19 pushed some graduates toward unorganised retail, alongside a broader shift in attitudes toward shopkeeping. Its annual study reportedly found a notable share of small-business owners aged 35-45 were graduates, though the excerpt gives no figures. The article says this group may increase business-app use and improve store experience. It illustrates the point with Rajeev Prasad, who returned to his family's Barabanki grocery shop after a logistics startup laid him off in 2020. He entered existing customer credit records in OkCredit to send payment reminders and added a cosmetics section; the article says credit was repaid faster and the new section attracted women customers. These claims are presented as the author's account, without quantified results.

### Source excerpt

Photo by Anmol Ramanujam on Unsplash There's a particular imagery that comes to mind when one thinks of a shopkeeper- sparsely educated, between 20 and 40 years in age, ceaselessly taking orders on phone with one hand and packing stuff with another. For this neighbourhood "bhaiya" or "uncle", only three things matter- customers, inventory and his bahi-khata (the account register). Now, picture a retail store owner in the same age group, but genial, well-informed, inclined to technology, using apps for his business needs. There is a stark difference in customer experience at both these stores. While there are a bunch of factors responsible for this change, one of them is educated folks, particularly graduates getting into unorganised retail. Neighbourhood stores in India have typically been run by semi-literate, less educated individuals, some of who join it as a family owned business. For others, it's the easiest source of livelihood, if they aren't qualified enough for a job.The barriers to entry are so low that anyone with a basic minimum qualification can open a shop. While this is true even now, Covid-19 has altered the scenario, partially. Rising unemployment has meant that graduates who would earlier prefer jobs, are now looking at unorganised retail as a viable source of livelihood. At OkCredit, we have credible data that shows this in reality. In our annual study released this year in March, the demographic data gave a true picture of this change. Even though, across age groups, owners of small businesses lack education, in the 35-45 age group, a decent chunk of business owners are graduates. Covid-19 may have been the forcing factor but this also points to a mindset shift among the educated class who have typically preferred "safe" jobs over business. For an outsider, this shift may seem trivial, but it's significant for two reasons- First, as more of educated class joins unorganised retail, there will be an increase in the usage of business apps. Young and