Posts

Showing posts from July, 2023

Google Map Intent - Android Studio - Kotlin

Image
How to open Google Maps with directions to a specific location (Latitude, Longitude)? You may have a scenario when you want to open a specific location on Google Maps by clicking a button. In this tutorial, we will input the latitude and longitude and by clicking a button we will open that location in Google Maps. >> Check For Java >> Check for Kotlin >> Check for Compose Complete Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" xmlns:app= "http://schemas.android.com/apk/res-auto" android:layout_width= "match_parent" android:layout_height= "match_parent" android:orientation= "vertical" android:gravity= "center" android:padding= "10dp" tools:context= ".MainActivity" > ...

Google Map Intent - Android Studio - Java

Image
How to open Google Maps with directions to a specific location (Latitude, Longitude)? You may have a scenario when you want to open a specific location on Google Maps by clicking a button. In this tutorial, we will input the latitude and longitude and by clicking a button we will open that location in Google Maps.  >> Check For Java >> Check for Kotlin >> Check for Compose Complete Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" xmlns:app= "http://schemas.android.com/apk/res-auto" android:layout_width= "match_parent" android:layout_height= "match_parent" android:orientation= "vertical" android:gravity= "center" android:padding= "10dp" tools:context= ".MainActivity" > ...

SMS Intent - Android Studio - Kotlin

Image
Open SMS Intent with Phone Number using Android Studio and Kotlin Learn how to create a simple SMS sending feature in Android using Android Studio with Kotlin. This tutorial shows how to build a clean UI with an input field for phone numbers and a button that opens the SMS app with the entered number. A step-by-step guide with Kotlin code for beginners and developers moving from XML layouts to Compose. >> Check For Java >> Check for Kotlin >> Check for Compose Code Snippet: val intent = Intent(Intent.ACTION_VIEW, Uri.parse( "sms:" + Uri.encode(phone))) startActivity(intent) Full Example: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout...

SMS Intent - Android Studio - Java

Image
Open SMS Intent with Phone Number using Android Studio and Java Learn how to create a simple SMS sending feature in Android using Android Studio with Java. This tutorial shows how to build a clean UI with an input field for phone numbers and a button that opens the SMS app with the entered number. A step-by-step guide with Java code for beginners and developers using the XML layouts. >> Check For Java >> Check for Kotlin >> Check for Compose Code Snippet: Intent intent = new Intent ( Intent . ACTION_VIEW , Uri . parse ( "sms:" + Uri . encode ( phone ))); startActivity ( intent ); Full Example: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" andro...