In this article, we’re going to see an overview of how the view we created in XML gets rendered on the screen in pixels.
Making a great-performing app is only possible by knowing what’s going under the hood. If you don’t know what the hardware is doing, you have a chance of using it poorly. Before exploring rendering, let’s learn the basics regarding the life cycle of a view.
If you have an idea of the life cycle of a view, you can skip this section.
Many of us aren’t aware views have a life cycle, but it’s very important…
When we press an app icon and open an app it displays an Activity with UI where we can navigate further between fragments or activities. When we navigate between different activities the system stores them in a stack and this stack of Activities can be defined as Task. If you want to know more about the process, task, and back stack please refer to my previous post on Understand Process, Tasks, and Back Stack.
In this post let’s understand what is Taskbuilder, why do we need it and how can we use it.
Before proceeding into the concept let’s first…
As part of app development, we do background tasks like syncing the local database with the server, prefetching some data from an API, etc.
When we say background job which means the app is not live and we are trying to do some stuff by consuming the system resources like RAM, battery, power, etc. Until Marshmallow release we are comfortable in doing these things mostly using services or intent service. Following it in Nougat Doze made its birth.
Doze mode is basically a state that intends to extend battery life by deferring app background CPU and network activity when a…
Building an Android app is easy. But building good-performing apps under various use-cases will be brilliant. So if you have an Android Studio downloaded there is nothing that we need but few clicks to follow to create a project and install an app by running the project. On the other hand for creating an app with performance optimizations we need to know about the in’s and out’s of the components we use while building a project. Most of us in the sense of Android developers will focus on things that might be needed just for getting the work done. …
Nowadays authentication has become common in almost all apps. And many of us know it would be like an overhead for beginner developers to learn and start working on the complete authentication flow from the client and server-side. Also, small start-ups at the earliest point might not be interested to afford the server maintenance and costs. Knowing user identity and serving content related to user history would increase the app engagement. So one-stop solution for this could be firebase Authentication.
In this post let’s learn What is Firebase Authentication, How to configure the authentication, and simple usage of login and…
SharedPreferences the common way used for storing key-value pairs in local storage. Datastore is a replacement to SharedPreferences to overcome its shortcomings. Datastore is an advanced data storage solution that was built using Kotlin coroutines and Flow to store data asynchronously, consistently, and transactionally. There are two ways to store data in DataStore. Those are Preferences DataStore and Proto DataStore. Please check out my previous post about introduction to Datastore and Preferences DataStore implementation
In this post let’s see we will know more about the following:
- Proto DataStore
- Basic implementation of Proto DataStore
Familiarity with coroutines…
SharedPreferences is the common way used for storing key-value pairs in local storage. We have been using the SharedPreferences concept since the start of Android development. As we are migrating to the latest programming languages like Kotlin there needs to be an advancement in terms of dealing with SharedPreferences. SharedPreferences have their downsides which will see in upcoming parts of this post. Also frequently changing properties may cause issues.
In Android, Floating bubbles or ChatHeads allow quick access to core features without fully opening the app. For example, replying to messages through Floating bubbles.
Floating bubbles are just views attached to WindowManager with custom flags. In this post we will see how we can attach them to the window manager, drag them and change their position.
To do the Floating Bubbles we need the help of a service which will be running in the background. However, background services are restricted for apps that target Android 9 (API level 28) or higher so we need a foreground service. A foreground…
There are four different types of Android app components:
BroadcastReceiver is one of the basic building blocks of Android components. In this article, let’s explore what broadcasts are, what broadcast receivers are, and how we can use them.
If you want to jump directly to the code base, check out the GitHub repo.
In Android, broadcasts are the system-wide events that occur due to changes in system state, like
LOW_BATTERY, incoming or outgoing calls, network connectivity change, device reboot, etc. These are some of the system events that require us to perform some action…
In the Android world, a typical definition of a service is an application component that executes long-running tasks in the background. It does not provide a user interface. A service mainly runs on the main thread unless otherwise specified. We should make sure to run non-blocking operations in services. Services have been a part of Android components since the start, but enhancements are being done on them to provide the best user experience.
A service runs in the background and can consume resources of a location, camera, etc. from the background itself. Since it doesn’t have any UI, users will…