Auto Read OTP with Runtime Permissions in Android

This tutorial will walk you through the steps required to automatically read the SMS for retrieving an OTP and auto-verify it. STEP-1 Create a new Android project with MainActivity and its layout as activity_main.xml. Once the project sets up, right click on your package folder go to New -> Other -> Broadcast Receiver. Enter the […]

Add and Remove views dynamically in Android

We’ll be creating views dynamically as shown in the below video. TAKE ME TO SOURCE CODE STEP-1 Create a new Android Project with MainActivity and its layout as activity_main.xml. For simplicity, let’s begin with just one linear layout in our layout and we will create other views dynamically. STEP-2 Create a file “ids.xml” inside the […]

How to replace a Fragment with another Fragment using custom animation

Are there any app in Google Playstore which does not contain fragments? Well, there may be. But, we are not talking about a static app. We are discussing about a full-fledged app. Every Android developer would know how important are fragments for an app. It allows us to reuse the code and we have a […]

Using Retrofit in Android

What is Retrofit 1. Retrofit is REST client for Java and Android which makes it easier to consume RESTful webservices. Retrofit adapts a Java interface to HTTP calls by using annotations on the declared methods to define how requests are made. 2. Parsing of JSON response is not required in Retrofit as it is done […]

Drag/Drop and Swipe to dismiss functionality in Recycler View

What is ItemTouchHelper 1. This is a utility class to add swipe to dismiss and drag & drop support to RecyclerView. 2. It works with a RecyclerView and a Callback class, which configures what type of interactions are enabled and also receives events when user performs these actions. How to use ItemTouchHelper For using ItemTouchHelper […]

Hide/Show Toolbar while Scrolling Recycler View

In this tutorial, you would learn how to hide and show toolbar automatically while scrolling up and down. One of the examples of this type of layout is shown above in the Google PlayStore app. The toolbar, which consists a search box gets hidden when we scroll up and automatically shows up when we scroll […]

Content Provider Tutorial

WHAT ARE CONTENT PROVIDERS Content Providers are used by an app to: 1. access data stored by itself 2. access data stored by other apps 3. provide a way to share data with other apps. Every android app runs inside its own process. Content Providers are the standard interface that connects data in one process […]

ANDROID LISTVIEW

WHAT IS LISTVIEW ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that’s placed into the list. LISTVIEW WITH […]

AutoCompleteTextView Tutorial

WHAT IS AUTOCOMPLETETEXTVIEW An editable text view that shows completion suggestions automatically while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with. The drop down can be dismissed at any time by […]

INTEGRATING VOLLEY LIBRARY IN ANDROID

WHAT IS VOLLEY ANDROID Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. ADVANTAGES OF USING VOLLEY Automatic scheduling of network requests. Multiple concurrent network connections. Transparent disk and memory response caching with standard HTTP cache coherence. Support for request prioritization. Cancellation request API. You can cancel a […]