It’s a common requirement to get screen width or height for Android developers in their Apps. In this article, I am sharing a simple utility class that will help you to get screen width & height in Kotlin Android. Just copy and paste the following utility class in your Kotlin project and it will get […]
Capture Video From Camera in Kotlin Android
In this article, we will discuss how to open the Default camera App in our App to capture video from the camera in Kotlin Android. After capturing video from the camera we will also play that video in the device’s default video player to check is the video recorded and saved perfectly. Following is the […]
Get File Path From URI in Android JAVA
In Android when we pick an image, video, or any other type of file from the gallery, documents folder, or capture directly from the camera, we receive a URI object in intent. We have different ways to get a full file path from URI based on content providers. In this article, we will discuss how […]
Pick Video From Gallery in Kotlin Android
In this article, we will discuss how we can pick a video from Gallery in Kotlin and then how we can play that chosen video in the phone’s default video player. You can follow the steps given below to pick all types of videos from the Gallery in Kotlin Android. 1. Open Gallery to Pick […]
Get Path From URI In Kotlin Android
When we pick an image, video, audio, or any other file from the gallery or documents directory we receive URI in intent in the onActivityResult(…) method. So we always further required to get a full file path from that URI. If we directly try to get the path through URI.getData() method, it doesn’t serve the […]
Pick Multiple Images From Gallery in Kotlin – Android
It’s a common requirement in Mobile Apps to pick an image from the Phone Gallery. Sometimes we also have to pick multiple images at a time from the Gallery. This article explains how you can pick multiple images from the Gallery at a time in Kotlin Android. If you are looking to pick just one […]
Find Distance between 2 locations in JAVA & SWIFT
Sometimes we have to calculate the distance between 2 locations when we have coordinates latitude and longitude for those locations. This article will discuss how you can calculate a straight line distance between 2 locations 2 programming languages, JAVA & Swift. 1. Code to Find Distance in JAVA In JAVA we don’t have any builtin […]
Get Current Location in Swift IOS
Apple provides the CoreLocation Framework to fetch the user’s current location through GPS. In the following article its explained how to get current location in Swift in the form of Latitude & Longitude. Just copy the following code in your ViewController, rest of the work will be done by it. The working of the code […]
jQuery Id/Hash (#) Selector With Examples
In this article, I am going to explain the most common jQuery Id/Hash (#) selector With examples. You may see the list of all available selectors here https://api.jquery.com/category/selectors/ Id Selector or Hash (#) Selector In HTML DOM element ID should be unique for each element. If you want to get an HTML element object you […]
Capture Photo with Camera in Kotlin – Android
This article shows a step by step guide to capture a photo with camera in Android using Kotlin. For this purpose, we need to initialize an Intent with MediaStore.ACTION_IMAGE_CAPTURE Action. Then open native Camera App using startActivityForResult(…), as shown in the following code. 1. Add Camera Permission Before starting, add the following CAMERA permission in your Manifest.xml file […]