There is tremendous growth in the Android ecosystem around the globe with a diverse community. People from different backgrounds, people with disabilities, people who wish to have fancy features like night mode, and more use Android apps in their day-to-day life.
Developing apps for such a diverse community is not an easy task. I’m not speaking about high-level architectures here. In contrast, it’s about simple things like strings, colors, dimens, etc. that will considerably affect modern Android development.
People usually feel comfortable using an application in their native language. The vital step is to maintain all the strings in a…
One of the best ways to display huge lists in Android is through
RecyclerView. As developers, you all might have used it. We have many advanced features like view holder patterns, rich animation, Diff-Utils callback to improve performance, etc. Apps like WhatsApp and Gmail use
RecyclerView to show endless conversations.
One of the significant
RecyclerView features that I use is view types. We can display multiple view types in the same
Before going into the actual concepts, first let’s understand the problem that we’re going to solve. State management is one of the critical aspects of any platform while the product is growing.
One of my apps in the Google Play store has a payment screen with multiple payment gateways. Users can make the payment with any gateway. After the payment, there will be an acknowledgment pop-up stating the status of the purchase.
There are numerous resources available for developers to implement DI in Android applications. But when it comes to DI in an Android library, I only found a few — and only a couple of those are actually useful.
So I decided to write an article on why and how I implemented manual dependency injection in an Android library. My experience with DI in libraries goes back to 2018 when the company that I work for made a deal with one of the industry leaders. They now wanted a part of our application to include their applications as a library.
Handling configuration changes regarding data management have been made easy with introduction of ViewModels. But when you think of unforeseen situations like process death, even viewmodels are of no use.
To be frank in most of the cases, viewmodel objects and the
onSaveInstanceState() method will do the trick, but when it comes to providing smooth and snappy UI to the users, pro developers should take process death into consideration, mainly when you’re supporting low end devices.
This is where the
Savedstate module comes handy,
ViewModel objects receive a
SavedStateHandle object via constructor. This object is a key-value pair like hash-map…
With the introduction of Kotlin in Android development, we all end up with those Util files containing all sorts of functions that we use in Android app development.
Util files is not a new kid on the block, but the functional capability of Kotlin makes it fancyier and more optimized than ever. We all know Kotlin is as much a functional programming language as it is object-oriented.
In my experience, I’ve used the object-oriented capabilities of Kotlin to create base classes and implement complex architectures. But when it comes to functional capabilities Kotlin is far handier. …
In this article, you’re going to learn how to implement dependency injection in the Android library using Dagger2. The focus of this article is AAR library format, but the process we follow here can be applied to any library format.
Dependency injection is another way classes acquire references of other classes. For example, there’s a class
BananaMilkshake, which may require the
Milk class. Here,
BananaMilkShake is dependent on the
Milk class. Often these required classes, like
Milk, are called as dependencies.
Implementing dependency injection provides you with the following advantages:
In this article, we’re going to learn about the Scaffold and Slot APIs and how to use them to design a fully functional screen in an Android application. You’ll learn how to create a top bar, a bottom navigation view, a drawer, and the main content of the screen. Most importantly, you’ll learn how Scaffold holds all of them together.
At the end of this article, you’ll find the Github project. Feel free to explore the code.
Jetpack Compose is one of the recent attempts from Google to make it easy for Android developers to build UI.
In this article, you’ll learn how maintain a remote sub-module in android projects. A remote sub-module is an android library module hosted on git as a repository that can be added as a sub-module to several projects. Along with that you’ll also learn why we need a remote sub-module and how to create one.
Let’s start from the basics, Consider an application with huge code-base and being maintained like forever. If you’re an android developer for a while, you would know the importance to separate things based on the purpose.
Consider a house without divisions like bedroom, kitchen, etc. I…
In this article, you’re going learn how to access data in user google drive via Google Drive API. First we’ll start by accessing the existing files in the drive then continue to upload a new file and finally how to download a file from drive.
In this modern era all most every android app need some kind of storage where they can store the data related to users. With increases in paranoiya of security users don’t trust remote servers anymore. …