Posts

SharedPreferences - Android Studio - Compose

Image
How to use SharedPreferences using Android Studio with Jetpack Compose SharedPreferences in Android Studio is one of the simplest and most commonly used ways to store small amounts of data on Android devices.  It allows you to save values in the form of  key–value pairs , making it ideal for storing lightweight and persistent data such as user settings, app preferences, login states, theme choices, and more. SharedPreferences supports saving the following data types:  String, int, boolean, long, float, and Set<String> . Because it is lightweight and fast, it is recommended when you need to store a small collection of simple key-value data. Using SharedPreferences, you can easily  add ,  update , and  remove  stored values without needing complex storage solutions like databases. To access SharedPreferences in Android, you can use any of the following APIs depending on your requirement: getPreferences()  – Accesses preferences that belong to ...

Dialer Intent - Android Studio - Compose

Image
How to launch dialer pad with a specific phone number using Intent Learn how to easily open the phone dialer or make a direct call in your Android app using Kotlin. This step-by-step guide explains how to use  Intent.ACTION_DIAL  and  Intent.ACTION_CALL , request runtime permissions, and write clean Kotlin code in Android Studio. Ideal for beginners and professional Android developers looking to integrate calling features into their apps. >>  Check For Java >>  Check For Kotlin >>  Check For Compose Code: MainActivity.kt package com.technifysoft.myapplication import android.content.Intent import android.net.Uri import android.os.Bundle import android.widget.Toast import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.comp...

Send Email using Intent - Android Studio - Compose

Image
How To Send an Email Using the Intent Learn how to implement email functionality in your Android app using Kotlin Compose and Android Studio IDE. This step-by-step guide covers using Android Intents to launch email clients with pre-filled recipient addresses, subjects, and message bodies. >>  Check For Java >>  Check For Kotlin >>  Check For Compose Code: AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" > <!--For Gmail Intent: Since Android 11 (API level 30), most user-installed apps are not visible by default. In your manifest, you must statically declare which apps you are going to get info about, as in the following:--> <queries> <package android:name= "com.google.android.gm" /> </queries> <application ...