Using FireBase with MVVM
Using FireBase with MVVM
FireBase with MVVM using Kotlin

This story demonstrates a sample android application for using FireBase Database with MVVM using Kotlin.

The application uses below features of firebase:

(1) Authentication

(2) Real time Database

(3) Storage

Brief introduction of Sample app:

The sample that is used as part of demonstration contains below screens:

(1) Login Screen : Authenticates the logged user with email/password provided

(2)Registration screen : This screen allows user to register with email/password over firebase.

For the above 2 screens we use firebase “Authentication” feature.

(3) Tax Info Entry screen: In this screen user will be provided UI to enter info about Tax bills…


This story describes about infinite list functionality using Kotlin.

Use case: For instance we are making an webservice call from mobile application to fetch data to be displayed in a RecyclerView. The back end webservice sends 300 or more rows at a time and pagination functionality is not implemented in backend.

Problems with the above use case: The problem with the above use case is we have to populate recyclerview with 300 rows using Adapter which is bad practice as all the elements are not visible at a time on Adapter .It’s …


Introduction: This story describes about sectioned RecyclerView in Android using Kotlin in combination with JetPack components.

What is SectionedList? A sectioned list displays items in a list based on section. For instance displays list of state capitals for each country. Where country is category under which all its related state/capital info is displayed.

Screen shots: The working example that implemented section list will have final output as below :


Introduction:

Android does not provide direct API for Expandable list using RecyclerView. The Android developer guide provides “ExpandableListView” that shows items in a vertically scrolling two-level list. This differs from the ListView by allowing two levels: groups which can individually be expanded to show its children. The items come from the ExpandableListAdapter associated with this view.

Disadvantages of using ListView: The ListView class is a bit too heavy — it has a lot of responsibilities. …


This story explains about Room DataBase with an use case. It covers most important RoomDB operations like insert,Query(3 variations),update,delete queries.

Repository Link:

https://github.com/chandragithub2014/MyBillsInfo

Use Case:

The user using this app can save information about his expenses in local DB. The app retrieves the added expense list and provides user an option to add new expense, update and delete individual items.

The below are the fragments that are used :

(1) LoginRegistrationFragment : This Fragment will have an edit text where user can enter userId. …


SonarQube:

SonarQube is a universal tool for static code analysis that has become the industry standard.

Features of SonarQube :

•SonarQube offers code-quality management by suggesting what is wrong and helps us put it right.

•It provides a clean dashboard to address bugs, coding rules, test coverage, API documentation, code duplication, complexity, and many more things.

•Other code quality tools focus mainly on bugs and complexity but Sonar covers 7 sections of code quality:- Architecture and design, unit tests, duplicated code, potential bugs, complex code, coding standards, and comments.

•SonarQube supports 25+ languages as well and generates reports of code…


What is Glide ?

Glide is a fast and efficient image loading library for Android focused on smooth scrolling. Glide offers an easy to use API, a performant and extensible resource decoding pipeline and automatic resource pooling.

Features:

•Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs.

•By default Glide uses a custom HttpUrlConnection based stack, but also includes utility libraries plug in to Google’s Volley project or Square’s OkHttp library instead.

Glide is also effective for almost any case where you need to fetch, resize, and display a remote image.

Glide uses a simple fluent API…


This story describes how to use Hilt dependency injection using Room DB along with Co routines in Kotlin.

This project uses MVVM and Kotlin . This project contains 2 screens that represents a list to display data from Room DB and also another screen that allows to add a new row in DB.

Step 1 :

Create a class that extends Application class with @HiltAndroidApp annotation

@HiltAndroidApp
class RoomDBApplication : Application() {
}

Step 2: Create an Object class that is annotated with @Module

This class contains 2 methods with @Provides annotation that provides dependencies .

One method returns the…


This story explains basics of Dependency Injection using Hilt framework with a sample example in Kotlin

Introduction:

What is Dependency Injection ?

Dependency Injection Comes into picture when there are 2 classes that are dependent on each other.

Second class makes use of first class. Then 2nd class is dependent on first class.

Official definition of Dependency Injection:

Dependency Injection is based on concept called “Inversion of Control”. This concept means a class should get its dependencies from external class rather than instantiating them in the class.

Dependency injection (DI) is a technique widely used in programming and well suited…


This story explains and list important Git commands for reference

What is Git ?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is Decentralized/Distributed version control system. Most operations in Git are local. Only few commands need n/w access. Git is Super Fast as most operations are local Free/open source.

What is a Repository?

It is described as Collection of Files Managed by Git and History of all them.

Commits and Files:

All the files managed by git are called Snapshots which…

ChandraSaiMohan bhupathi

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