Posts

Showing posts with the label Firebase

Face Detection - Google ML - Android Studio - Java

Image
Detect Face using Google/Firebase ML Kit In this tutorial, we will detect the face(s) from an image. We will use to get the Bitmap from an image in the drawable folder, but we will also show how you may also get the Bitmap from Uri, ImageView, etc.  Using the ML Kit Face Detection API, you can easily identify the key facial features & get the contours of detected faces. Note that the API only detects the faces; it doesn’t recognize the people. With the ML Kit Face Detection API, you can easily get the information you need to perform tasks like embellishing selfies & portraits or generating avatar(s) from the user's photo. Since the ML Kit Face Detection API can perform Face Detection in real-time, you can use it in applications like video chat or games that respond to the player's expressions. We will use the Android Studio IDE and the Java language. >> Check For Java >> Check For Kotlin >> Check For Compose Video Tutorial Coding build.gradle depende...

Face Detection - Google ML - Android Studio - Kotlin

Image
Detect Face using Google/Firebase ML Kit In this tutorial, we will detect the face(s) from an image. We will use to get the Bitmap from an image in the drawable folder, but we will also show how you may also get the Bitmap from Uri, ImageView, etc.  Using the ML Kit Face Detection API, you can easily identify the key facial features & get the contours of detected faces. Note that the API only detects the faces; it doesn’t recognize the people. With the ML Kit Face Detection API, you can easily get the information you need to perform tasks like embellishing selfies & portraits or generating avatar(s) from the user's photo. Since the ML Kit Face Detection API can perform Face Detection in real-time, you can use it in applications like video chat or games that respond to the player's expressions. We will use the Android Studio IDE and the Kotlin language. >> Check For Java >> Check For Kotlin >> Check For Compose Video Tutorial Coding build.gradle depen...

Firebase Database Offline Capabilities | Android Studio | Kotlin

Image
Firebase Offline Capabilities for Firebase Database What if there is a temporary internet issue with your device? What if you don't want to load your database data again & again? Firebase easily allows you to achieve this task by persisting the data locally, managing presence and handling the latency. The data is available offline even if you restart the app or device. It will behave the same as you're online. Firebase keeps a queue of all write operations that are performed while your application is offline e.g. unstable internet connection. When your app becomes online all the queued write operations are sent to the Firebase Realtime Database Server. >>Check For Java Enabling Firebase Offline Persistence Once you enable the  Disk Persistence then the firebase handles the job automatically. You just need to add the following code snippet in your Application Class. MyApplication.java class MyApplication : Application() { override fun onCreate () { sup...

Firebase Database Offline Capabilities | Android Studio | Java

Image
Firebase Offline Capabilities for Firebase Database What if there is a temporary internet issue with your device? What if you don't want to load your database data again & again? Firebase easily allows you to achieve this task by persisting the data locally, managing presence and handling the latency. The data is available offline even if you restart the app or device. It will behave the same as you're online. Firebase keeps a queue of all write operations that are performed while your application is offline e.g. unstable internet connection. When your app becomes online all the queued write operations are sent to the Firebase Realtime Database Server. >>Check For Kotlin Enabling Firebase Offline Persistence Once you enable the  Disk Persistence then the firebase handles the job automatically. You just need to add the following code snippet in your Application Class. MyApplication.java public class MyApplication extends Application { @Override publi...

Send User Verification Email | Android Studio | Kotlin

Image
Firebase Email Verification:  Since any user can create an account in your firebase app whether this email exists in real or not so your app may need to verify that the email actually exists. You can easily send an email address verification email to a user with the   sendEmailVerification   method.  >>Check For Java Video Tutorial: Let's start: How to verify? private fun sendEmailVerification () { //get instance of firebase auth val firebaseAuth = FirebaseAuth.getInstance() //get current user val firebaseUser = firebaseAuth.currentUser //send email verification firebaseUser!!.sendEmailVerification() .addOnSuccessListener { Toast.makeText( this @ProfileActivity, "Instructions Sent..." , Toast.LENGTH_SHORT).show() } .addOnFailureListener { e -> Toast.makeText( this @ProfileActivity, "Failed to send due to " + e.message, Toa...

Send User Verification Email | Android Studio | Java

Image
Firebase Email Verification:  Since any user can create an account in your firebase app whether this email exists in real or not so your app may need to verify that the email actually exists. You can easily send an email address verification email to a user with the sendEmailVerification method.  >>Check For Kotlin Video Tutorial: Let's start: How to verify? private void sendEmailVerification () { FirebaseAuth firebaseAuth = FirebaseAuth . getInstance (); FirebaseUser firebaseUser = firebaseAuth . getCurrentUser (); firebaseUser . sendEmailVerification () . addOnSuccessListener ( new OnSuccessListener < Void >() { @Override public void onSuccess ( Void unused ) { Toast . makeText ( ProfileActivity . this , "Instructions Sent..." , Toast . LENGTH_SHORT ). show (); } }) . addOnFailure...

Reset Firebase Password | Android Studio | Kotlin

Image
How to reset the firebase password? If the user forgot the password then the user can easily reset the password by entering the registered email. The user will receive a link to reset the password. >>Watch For Java The User can send a password reset email to a user with the sendPasswordResetEmail method. For example: activity_forgot_password.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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_height= "match_parent" android:background= "@color/colorWhite" android:padding= "10dp" tools:context= ".ForgotPasswordActivity" > <TextView android:id= "@+id/label1Tv" android:layo...