In this tutorial, we will teach you how you can pass value from the recycler view adapter to activity in Kotlin. First, you need to create an interface: Here, “RVInterface” is short for “Recycler View Interface”. Now, suppose we have the following model class: And we create an array list of 3 users. Then you …
Read More “Pass value from recycler view adapter to activity – Android Kotlin”
Previously, we created a tutorial to show you how you can download an image in your storage using Java. In this tutorial, we will show you how you can download any file in your android phone’s storage using Kotlin. First, you need to create a file named “DownloadImageTask.kt” and write the following code in it: …
Read More “Download files in storage – Android kotlin”
In this tutorial, we will show you how you can display HTTP images in your ImageView in your android app using Kotlin. We will be displaying this image “https://www.nasa.gov/sites/default/files/styles/full_width_feature/public/thumbnails/image/stsci-01gfnn3pwjmy4rqxkz585bc4qh.png” in our image view. Then create a file named “FetchImageFromInternet.kt” and write the following code in it: And this will be your image view: Then whenever …
Read More “Display HTTP images in ImageView – Android kotlin”
To select a file from internal storage in android using Kotlin, first, you have to start an intent with a request code. After that, when the image is selected from the gallery by the user, it will be received in the onActivityResult method. So we need to create the following methods in our activity: Run …
Read More “Select file from internal storage – Android kotlin”
In the Android Volley library, you can pass headers with an HTTP request using Kotlin. Headers are used to pass additional information. Following will be the code to pass headers with the Volley library: If you want to see how you can handle headers in the backend in Node JS, you are free to check …
Read More “Pass headers with Volley – Android kotlin”
In this article, we will be creating a left menu drawer in an android app using Kotlin. Following will be the code of your activity: You need to implement and interface “NavigationView.OnNavigationItemSelectedListener” to your activity. Create instances of “DrawerLayout”, “ActionBarDrawerToggle”, and “NavigationView”. Create the following 2 attributes in your “res/values/strings.xml”: And your “activity_home.xml” should look …
Read More “Left menu drawer – Android kotlin”
In this tutorial, we will teach you how you can login a user with JWT (JSON Web Token) in the android app using Kotlin and Node JS. We will be using Node JS to generate JWT and Mongo DB to save it. Creating an activity First, we will create an empty activity named “LoginActivity.kt”. Following …
Read More “Login with JWT – Kotlin, Node JS, Mongo DB”
This tutorial will create an android user registration activity in Kotlin. You will learn the following: Creating an activity First, we will create an empty activity named “RegisterActivity.kt”. Following will be the code of that file: This will look for a file named “activity_register.xml” inside the “res/layout” folder. Create an XML file Then we will …
Read More “User registration – Kotlin, Node JS, Mongo DB”
We created a chat application in native Android using Kotlin and Node JS. We have used Mongo DB as a database. Modern and professional UI End-to-end encryption Usually, we use encryption but on server side. It has a security issue i.e. plain messages are transmitted through a network that can be read or altered in-transit. …
Read More “Android chat app in Kotlin and Node JS”