If you are using Realm Database in your Android App, you must have faced the migration issue while submitting new versions. If we don’t migrate Realm database properly, it causes crashes when users update the App. This article is a guide to Realm database migration in Android. Basic Realm Database Migration Steps Add the following […]
Error: Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 12.0.1
I have faced this “Requirements check failed for JDK 8” error in Ionic Studio when I tried to run my newly created Ionic App in Android Device. The exact error was the following. Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 12.0.1Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables. Reason This error happens […]
Ask Runtime Permission in Kotlin Android
As we all know from API level 23 (Android 6.0) and above, we need to ask Runtime Permissions in Android App. The following article contains utility methods to ask runtime permission in Kotlin Android. This code also shows an Alert Dialog to the user to allow permissions from App Settings, if the user denies permission […]
Easiest Way to Observe Application Lifecycle Events in Kotlin Android
Are you looking to observe events like OnStart, OnResume, OnPause, OnStop & OnDestroy for your Android Application in Kotlin? This guide shows the easiest way to listen & receive lifecycle events related to your Application. In this tutorial ‘LifecycleObserver‘ interface is used. Using this interface we can easily observe Application Lifecycle Events in Kotlin Android. Following […]
Ultimate Guide to Observe Application Lifecycle Events in Android
Recently, Android has provided LifecycleObserver interface to observe Application lifecycle events easily. But I have seen on Stackoverflow that few developers are still struggling in using ‘LifecycleObserver‘ interface. This tutorial will help you to understand how to listen, Application Lifecycle Events. Using ‘LifecycleObserver‘ interface we can easily receive Application Lifecycle Events in Android. Following is […]
Pick Image From Gallery in Kotlin – Android
This article contains a step by step guide to pick an image from the Gallery in Kotlin Android. Before starting, add the following READ_EXTERNAL_STORAGE permission in your Manifest.xml file above the application tag. You also need to add Runtime permissions for API Level 19 & above. This article will help you to Ask Runtime Permissions […]
Resize Bitmap by Keeping the Same Aspect Ratio in Kotlin – Android
In Android, we use the Bitmap class to store images. Following is a utility method that would help you to resize Bitmap by keeping the same aspect ratio in Kotlin. Following is the Kotlin solution. Those who are looking for the Java solution can visit How to Resize a Bitmap by Keeping the Same Aspect Ratio in […]
How to Resize a Bitmap by Keeping the Same Aspect Ratio – Android
In Android, we use Bitmap class to store images. This class contains many functions to apply different operations on images. But there is no builtin method to resize images by keeping the same aspect ratio. Here, I am sharing that utility function to resize a bitmap by keeping the same aspect ratio. Following is the […]
RecyclerView with Multiple View Types – Chat App Example
As we all know that RecyclerView is a UI component to show lists in Android. In this tutorial, you will learn, How to create a RecyclerView with Multiple View Types in Java Android. It’s is a chat App example. In this example, 2 types of views (text message in and out) are considered. Following is the step […]
Custom Adapter with Multiple View Types for RecyclerView in Kotlin – Android
As we all know that RecyclerView is a UI component to show lists in Android. In this tutorial, you will learn, How to create a Custom RecyclerView Adapter with Multiple View Types in Kotlin Android. Following is the sample RecyclerView Custom Adapter. It includes multiple view types and written in Kotlin. But if you are looking for […]