An analysis of updating outer screens on Android when an action is performed in an internal flow.

Peer-to-peer money transactions through mobile apps have become increasingly convenient and effortless. It’s an ever-changing landscape, with a lot of potential to be interactive.

In November 2020, we launched GoPay Social. It allows our users to have a social interaction (called ‘moments’) attached to every peer-to-peer money transaction. Users can see their friends’ moments if their friend has opted for it to be visible, interact with these moments on their feed, and whole lot of things to make these transactions interactive and not tedious.

Read more about GoPay Social here, or check out the video:

GoPay Social Flows

Now that…


Successful launch of Chandrayaan-2 (cc: TIO)

Pepperfry’s Android app is launched 1.3L+ times a day by our happy customers. This number is growing daily. A quick and smooth launch makes sure our users can quickly perform the action they intend to perform. A slow or delayed launch can lead to frustration for our users and a potential drop-off. In August 2019, we ideated and set up a plan to ensure a faster launch for our Android app and have enhanced our launch performance by ~40%.

Objectives

We set out objectives to enhance the launch performance. Most of these were user experience objectives while some were code enhancements.


The title of this post may trigger a debate about Rx and coroutines being completely different solutions and hence incomparable. That is completely true: Rx works with asynchronous streams of data and coroutines are (in my opinion) asynchronous callback-driven functions. Yet, they are used interchangeably on Android to drive network calls and hence this comparative post.

Photo by Ishan @seefromthesky. Banner from canva.com

I had to work with a complex network chain for my Starwars sample Android app. I ended up writing the chain using both Rx and Coroutines. This post is about my experience with both.

The chain

I was using the SWAPI service to build the following…


Photo by Startup Stock Photos from Pexels

This is the third and final part of our series on Kotlin migration undertaken for the Android app at Pepperfry. This migration included the move from Java to Kotlin along with the move from MVP to MVVM architecture.

In the first part, we discussed the motivation behind our migration:

In the second part, we discussed our process:

In this part we will be discussing our learnings from the Kotlin + MVVM migration: code conciseness myths, importance of test cases, stable releases and Android studio tools, among others.

Kotlin code != Less code

This is one of the most controversial statements we had to make. Kotlin…


This is the second part of a 3 part series on Kotlin migration undertaken for the Android app at Pepperfry. This migration included the move from Java to Kotlin along with the move from MVP to MVVM architecture.

In the first part, we discussed the motivation behind our migration:

In this part we will be discussing the process behind our migration: setup, modular approach, inclusion of test cases & weekly knowledge sharing sessions.

Setup

At first, we laid out the foundation of the new architecture creating base classes for Fragments & ViewModels. We also created extension functions for Image loading, String…


This is the first part of a 3 part series on Kotlin migration undertaken for the Android app at Pepperfry. This migration included the move from Java to Kotlin along with the move from MVP to MVVM architecture.

In this part we will be discussing the motivations behind our migration: legacy code structure, problems faced with legacy code, why we chose Kotlin along with MVVM and our approach to the migration.

About our Android app

The first commit of our Android app was made on the 3rd of May 2016.
In the 3+ years since:

  • We have deployed 80+ versions on Google Play
  • Added…


Templates save time | from pexels by Mike

The ListAdapter extension first made its appearance in the v27.1.0 version of the Support Library and now resides in the androidx.recyclerview.widget package post the AndroidX migration. ListAdapter is a wrapper around the AyncListDiffer helper. It includes computing diffs between Lists on a background thread and handling updates at different adapter positions.

All you need to do is make a call to the submitList(data: List<T>) function and it will compute the best way to update the items for you.

Taking inspiration from Akshay Chordiya’s File template for RecyclerView Adapter in Kotlin, below is a template adding support for ListAdapter and some…


by rawpixel on Unsplash

As programmers, we do a lot more everyday besides writing amazing code.

Yes, coding is what the majority of us love to do the most and what people associate us with the most. But there are various other skills involved in being a great programmer.

Below are some of these skills I think we sometimes fail to acknowledge. They are worth nurturing further to become a better programmer and also a better person.

Reading

We read daily.

Be it a fellow programmer's code, (sometimes bamboozling) documentations, blogs, forums or Jon Skeet facts on StackOverflow, we read constantly.

The more we read…


A guide to intelligent syncing of data in your offline-first Android apps

To build an offline-first Android app, which is usable in flaky or no internet connectivity, we need to locally cache our app’s data. Majority of the time, this data needs to be synced as much as possible and practical with fresh data from some type of back-end.

This is where the dilemma for us Android developers kicks in: Sync the data inadequately and your user sees stale data; Sync too many times and drain the user’s battery as well as waste your server bandwidth.

What are some of the strategies we can implement to handle syncing in our Android apps?


When we create a new project on Android Studio, it gives us one module, the app module. This is where a majority of us write our entire application. Each click on the run button fires a gradle build on our entire module and all the files in it are checked for changes. This is why gradle builds can take 10’s of minutes for larger applications and slow down developer output.

To solve this, complex applications like Uber decided to modularize their applications and have gained a lot from it. Following are some of the advantages of having a modular project

karntrehan

Android @ GoJek | https://karntrehan.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store