Writing Efficient DAOs in Room: The Backbone of Offline-First Apps (#OF05)

In our previous article, we covered Entities in Room. Now, let’s explore DAOs (Data Access Objects) – the bridge between your app and the database. DAOs allow you to execute queries that allow is to insert, update, and delete records efficiently and thats exactly what we are going to explore today. What is a DAO? A DAO is an interface annotated with @Dao that defines methods for interacting with the database. The Room compiler generates the necessary implementation for these interfaces and its methods, which enables us to access the database efficient and type safe. ...

March 9, 2025 · 7 min

Room Entity and its intricacies (#OF04)

In our previous article, we explored the key components of Room. Now, let’s take a deep dive into Room Entities, their importance, and the various ways to customize them. Entities are the foundation of Room—they define how your data is stored in the database. Properly structuring your entity ensures efficient querying, maintainability, and scalability. Let’s break it down! 🛠️ 🏗️ What is an Entity? An Entity in Room represents a table in the database. Each instance of the entity corresponds to a row in the table, Room generates corresponding SQL table schema based on how you create an entity class. ...

March 2, 2025 · 10 min

Key Components of Room & Manually Creating A Database Instance(#OF03)

👋 Intro On the previous article we have set-up the Room dependencies and plugins, Now lets get into the primary key components of a room library. There are three important components: Entity, DAO’s, and Database. Entity represents a single row of a table. (Table structure) DAO’s (Data Access Objects) are interfaces to write queries and define operations. Database is where you associate entities and include the DAO’s you’d like to access from outside. Let’s check it out one by one! 🔍 ...

February 22, 2025 · 5 min

Understanding Recurrent Neural Network

When diving into AI/ML, we constantly hear about transformers and their revolutionary impact. But how did we get here? The journey started from Traditional Neural Networks ➡ Recurrent Neural Networks (RNNs) ➡ Attention Mechanisms and finally to Transformers. RNNs were a significant milestone because they addressed sequential data processing but had major limitations. These limitations led to the birth of attention mechanisms and transformers. Interestingly, before GPT became a household name, Google extensively used RNNs in their products, including predictive text, speech recognition, and early recommendation systems. ...

February 19, 2025 · 4 min

Static App Shortcuts in Android: A Simple Implementation Guide

Have you ever long-pressed an app icon and seen quick actions like “Search” or “New Message”? These are App Shortcuts, a powerful feature that allows users to interact with your app faster and more efficiently. In this guide, we’ll explore how to implement static app shortcuts in Android to enhance user experience. What Are App Shortcuts? App shortcuts provide quick access to common app features when the user long-presses your app icon. Along with system options like App Info and Pause App, you can define your own custom shortcuts for essential actions. ...

February 15, 2025 · 3 min

Setting-up Room Library and its dependencies(#OF02)

Before we proceed with the setup, let’s quickly recap why we chose Room: ✅ Compile-time SQL Validation – Catches errors early by verifying SQL queries at compile time. ✅ Kotlin-first Approach – Supports coroutines, Flow, and LiveData natively. ✅ Less Boilerplate Code – Simplifies database interactions while maintaining SQLite’s power. ✅ Seamless Migration Handling – Built-in support for database migrations. For a more detailed explanation, refer to the official Android documentation. ...

February 10, 2025 · 3 min

Upgrading Your App to Offline First With Room (#OF01)

Why Should You Care? Making your app offline-first is essential if you want to provide the best user experience. It makes your app significantly faster by reducing the number of network calls, which in turn also reduces server costs. What does Offline-First mean? The core idea is to persist/store remote-fetched data on the device. This allows users to access the data instantly, skipping unnecessary network requests—until the data expires or is invalidated. ...

February 9, 2025 · 5 min