Sometimes we have to put constant non-editable text in EditText in Android. For example, when we have to take phone number as input we can put fix country code as a prefix. In the case of website address as input, we can put “https://” as hardcoded string at the start. For this purpose, you can […]
How to View Realm Database in Realm Studio in Android
Nowadays a lot of people are using Realm Database in their Android & IOS Apps. The basic reason for using the Realm database is that it provides us an option to directly map & save Class objects into Database. It also provides us an option to add observers & listeners whenever the data is changed […]
Easiest Way to Implement Facebook Login in Android
As an Android developer, we have to add Facebook login in Apps in our routine life. Every time we have to copy-paste code in our Activity class. For that problem, I have written a Facebook Activity class, which you can just copy-paste in your App and extend your Activity class from this FacebookActivity instead of […]
Ultimate Guide to Realm Database Migration in Android
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 […]