Chat Application with Firebase | Android Studio 2024
ฝัง
- เผยแพร่เมื่อ 1 ธ.ค. 2024
- Fully featured Chat Application Development with Firebase :
In this complete video, I will guide you through the process of building a chat application from scratch using Firebase as the backend in Android Studio.
You'll learn how to set up Firebase, design the user interface, implement user authentication with phone OTP, and integrate real-time messaging using Firebase's powerful features. Additionally, you will learn how to implement features such as Recycler view, chat view, cloud Firestore, and login with profile picture.
If you want to support
☕ Buy me a coffee!"☕
www.buymeacoff...
Just follow the steps in the video.
More videos about Android Application Development will uploaded so get in touch with the channel.
So you are no more far.You can be developer.
#chatapp #firebase
Chapters:
00:01:26 Project Setup
00:08:46 Phone Login Page UI Design
00:20:14 OTP & Username Page UI Design
00:27:20 Login with Phone number
00:32:26 Connect to Firebase project
00:37:14 Phone Authentication with OTP
00:51:35 OTP Verification and Resend OTP
01:01:05 Save User Details in FirebaseFirestore
01:16:05 Design MainActivity Bottom Navigation View
01:28:04 Search User Page UI Design
01:36:35 List User in RecyclerView
01:50:55 Open ChatActivity User onClick
01:59:42 ChatRoom Implement
02:07:51 Send Message To Users
02:15:11 Display Message in RecyclerView
02:25:17 Recent Chats in RecyclerView
02:45:00 Update User Profile
02:55:23 Add Profile Picture
03:13:06 FCM Push Notification
03:26:36 Notification device to device
03:37:33 Change App Icon
---------------------------------------------------------------------------------------------------------------
GITHUB LINK :
github.com/bim...
---------------------------------------------------------------------------------------------------------------
💬 ACCESS THIS CHAT APP SERIES PLAYLIST 💬
• Chat App with Firebase...
---------------------------------------------------------------------------------------------------------------
🔥 MAKE YOUR OWN APP SERIES
• Make Your Own App
---------------------------------------------------------------------------------------------------------------
If you have any queries or doubt Comment below will reply.
And Don't forget to Subscribe for more Stuffs.
------------------------------------------------------------------------------------------------------------------------------------------------------
INSTAGRAM :
/ easytutoyt
Great tutorial dear, learned a lot. Thank you for this wonderful project.
i'm hyped :) excellent project
Glad to hear it!
Real hardwork is always in the corner$$$$
Amazing tutorial, straight to the point, packed with knowledge! Thank you so much!
Thanks
Thx really thank for you hard work making this videos,i was searching for a lot how to take the sha1 and the sha 256 and was that simple to enter in that experimental mode ,thx a lot
Glad I could help❤️
Thank you so much for this project, I think it was the start point for me to enter the mobile world.
This project 😻😻😻 thank you so much
appreciated i really helpful please create more videos about firebase firestore using java.
Got it will buy you the coffee! definitely!
Sir I can not explain you how much this video helped me thank you so much sir to create amazing video it gonna be very helpful
Thank you for your valuable comment
Thanks. Learned a lot . This is one of the best tutorial a have seen in youtube. Though some part of code need change , because android keep changing staff. But the code work.
Glad it helped
Did u have ER for this
Thank you for wonderful tutorials rlly appreciate them.
Superb video my project complete till 1:30h
Good going.
bro complete hua kya poora
You are the best among the rest
Thanks
you teach very very well... i wish u could also teach in kotlin
All the latest videos in the channel are in Kotlin.
And future videos will also be in kotlin.
Its great tutorial.Also please make a alternative version for firebase like web sockets.
hello am facing an IndexOutOfBounds exception occurring when I press the back button to return from chatActivity to search activity
Did you find the solution? I have alrwady spent hours, please can u fix this?
Please show me how to implement Admob, app open ads, interstitial ads, native ads and rewarded ads to the project 🙏🙏🙏
Really awesame explenation.
Glad you liked it ❤️
Sir please i have a problem between the time 2:00:00 and 2:10:00 when implementing the Chat Room, i have followed all the steps, but when i try to run de application and select a user the chat room does not open and returns to the chat screen, and i can't see where is the problem.
you can fix?
Just do adapter.notifyDataSetChanged() in onResume of adapter
i love you Bro, you are the best👽💗
Love you more 🥰
i am from Bangladesh. Appreciated i really helpful please create more videos about firebase firestore using java
Yeah sure
Expert👏
❤️
Hey, when I'm in the chat activity and I press back, the screen goes dark and it goes to main activity instead of search activity. if i try this again, the app closes with the message this app keeps closing. Please can you help
I have followed all the tutorials and when I enter the phone number it says verification failed and does not send the OTP. What can I do to make the verification to be sent to the phone
Can you help me to fix the device to device notification section, because the Cloud Messaging API (Legacy) cannot be enabled with the message "If you are an existing user of the legacy HTTP or XMPP APIs (deprecated on 6/20/2023) , you must migrate to the latest Firebase Cloud Messaging API (HTTP v1) by 6/20/2024".
Сэр, пожалуйста, у меня проблема между временем2:00:00и2:10:00при реализации комнаты чата я выполнил все шаги, но когда я пытаюсь запустить приложение и выбрать пользователя, комната чата не открывается и возвращается к экрану чата, и я не вижу, в чем проблема.
Just do adapter.notifyDataSetChanged() in onResume of adapter
amazing video. thanks
Thanks
Sir ji aisi hi video late rahi ❤ se dhyanwyaad
❤️
Thanks thanks a lot for this tutorial
Thanks ❤️
you are best!
Thanks 🥰
i am getting IndexOutBound Exception while backpressed from the chatFragment. Could you please help me on this ..
same issue
issue fix krdiya hai bro upar reply kra tha mene kisi ko wo check krke fix krlo
@@Yash-912 sorry i can't understand..
hello bro, is this tutorial fine? are all things working or something is not working?@@Yash-912
Did you solve this ? Thanks.
What is the version of Android studio in your clip. I just started learn this and new version is mayby quiet different than yours and this made me very confused. Thank you so much !!!!!
When I am writing code for a chat room ... Instead take me to the chat activity ... It takes me to the previous activity what is the problem... Can you tell me...
It's crashing and reopening the app again.
Check in Logcat where it's crashing and what is the cause.
Please give it's solution I am getting same error
Hello, I am a programming student for in Yemen and I would like to implement your wonderful project for the Android Applications subject. I have encountered some problems with Firebase. Please, can you help me, sir?
dependencies {
// ...
// Import the Firebase BoM
implementation(platform("com.google.firebase:firebase-bom:32.5.0"))
// Using KTX libraries for Authentication and Cloud Firestore
implementation("com.google.firebase:firebase-auth-ktx")
implementation("com.google.firebase:firebase-firestore-ktx")
}
I hope this will help you brother
hey brother can you share documentation of this project or how this app`s logic works ? please i want to build this app by my own
Great Tutorial I loved it❣
Thank you so much!!
@@EasyTuto1 Sir mere app me Recent Chats show nhi ho rhe hai sare spelling check kiya sab shi hai kuch error bhi nhi hai code me , please help me
Great tutorial..please guide to add encryption
Noted.
Hey man first of all thanks a bunch for the video, it's great!
I just have a question about the progress bar, when I use it it is really ugly in my app, did you custom make yours?
You can make your custom progress bar.
Or use gif as imageview
Or use Lottie Animation.
You can do anything.
Cloud Messaging API (Legacy)
If you are an existing user of the legacy HTTP or XMPP APIs (deprecated on 6/20/2023), you must migrate to the latest Firebase Cloud Messaging API (HTTP v1) by 6/20/2024.
What should I do in this case? I'm not getting the notifications because I'm not getting the server key
Can you make it so that when we search users, it synchronizes the contacts with the device and shows users who use the app that are saved in the device's contacts? Thanks
Can u please make a complete tutorial Maths quiz app for kids
Waiting for your reply
@EasyTuto1 bhai error aa rha hai isme recent chats show nhi ho rhe hai blank screen aa rhi hai please reply bro I am very close now
i found that it is just displaying fragment_chat and since it has only empty recycler view so it is showing blank screen in my case
can you please tell me how to fix it
Send you codes in
contact.easytuto@gmail.com
Also share the screenshot of the firebase database where lastMessageSenderId are there.
I will check tomorrow and get back to you.
@@EasyTuto1 bhai mene aapke github se match kra poora code same hai just it is showing frament_chat.xml inplace of recent_chat_recycler_row.xml
@@EasyTuto1bhai hogya wo timestamp me t small tha firebase me ye hi error tha thank you so much bro🥳🥳🎉🎉🎉🤩
Great bro🥳😍
There is a problem with displaying the last message in chatactivity, why can't you fix it?
What problem?
Sir can you help me please. I have followed all the steps but when I enter the mobile number so that it can send OTP it says verification failed. So how can I fix it to send the OTP to my SMS
hi after I finished creating view for chatfragment but it is not showing anything on mobile and on virtual phone also
I have a problem between the time 2:00:00 and 2:10:00 when implementing the Chat Room, i have followed all the steps, but when i try to run the application and select a user the chat room does not open and returns to the chat screen, and i can't see where is the problem.
Problem solved
Actually i did a mistake at getUserModelFromIntent in Androidutil
where i wrote "useId" instead of "userId"
by rewriting "userId" the app worked perfectly
Great you fixed it.❤️
thank you
After creating splash screen and copying intent now my apps stopping working and i am unable to run it
sir, can you please share the name of the linux distro you are using ?
An internal error has occurred. [ BILLING_NOT_ENABLED ]
i want to use the free plan, can you explain me how?
solved
In my chat application I can't able to solve this problem, when I am clicking the edittext and keyboard opens the recyclerview is not scrolling to the last position, but after sending a message it's scrolling, how to solve this problem?
Layout m problem hai bhai marigin set karo
"If you currently have Phone Authentication enabled in your project, and do not link your project to a Cloud Billing
account before August 1, 2024, the Phone Authentication service will be disabled automatically."
Now it is asking for money right? Is there any ways to get it to work now?
please reply if some one have answer
I have a problem in the section 2:23:00 of the video, my problem is that I have a very big space between the messages, I mean when I send a message each message appears in screen the space between the message and the other is a full screen for example I send "Hi" then I send "How are you?" it looks like this:
Hi
How are you?
and I have checked the margin between the right and the left message all things i have copied from the video so i don't know how to fix it, if you know please help me!
Change the chat message recycler row relative layout's width and height from match parent to wrap content
@@Abdulfarith-js6nk it worked thank you
i cannot run the project, the android resource cannot link, how will i do?
Why it is not showing FCM is connected after firebase connection
Greate. But when i enter any edittext edittext doesnot come up with the keyboard
what should i do to achieve this
May be emulator issue, Try on phone.
Remove the EdgeToEgde in your code (somewhere in ChatActivity)
3:27:27 not showing the enable option only showing failed to load. I have tried multiple times 😢😢😢😢😢
hello brother, my app is working fine as per tutorial, i have also added multiple other features like other user detail, and functionality of group chat but now i don't know how to send fcm push notifications to multiple user(group members) do i have to give the users fcm token list instead of the other user fcm token?? plz help..
Just send notification n to each user with the FCM token of each user looping it.
@@EasyTuto1 Thank you, it worked sir
I have run the app successfully but I'm facing a issue, first time my app is working properly but second time when someone closes and reopens the app it is getting crashed everytime
Check the Logcat, There should be error message.
did u fix it?
@@Odino3107 yeah I have solved it very earlier,
the search user bar only shows users which have been added manually . It doesnt show user with real phone numbers
Check the query you are hitting correctly.
Do we get the OTP code automatically? From where?
at 2:06:54, instead of showing me the supposed dms with the other user, it takes me back to Chatroom screen even though I've followed everything, what could be the issue?
It might be crashing, There should be something in LogCat check.
@@EasyTuto1 Hii sir im also facing same issue main problem is its due null pointer exception I have to apply on otherUser but don't know how
sir i picked your project from github it ran on my mobile but how can i change the database to login in the app. please reply as fast as possible i am in hurry.
Create a firebase project with your gmail enable Authentication,Firestore,Storage and Messaging.
And add the google-services.json file in the project and run.
can you help me , my let me in button in showing
and not working
hi , it is not showing list of recent chats in chat fragment , I cannot figure it out what has happened
Check the code something you might have missed.
Or else check in firebase the lastmessagetimestamp may be some thing is wrong there.
Sir , can u make more tuto for Update,Delete Message
I have a problem.
It is giving error in LoginOptActivity.
After entering the number, pressing the Button gives an error👾
What kind of error?
I can't find the key of the Cloud Message server because it has been deleted. What can I do?
We need to use new version , old one is deprecated.
@@EasyTuto1 Hi, can you give us some details about the new version, please?
when i search in chatt applicaion, thy dont give me user name, please give me a solution for this problem , i will send you image or my error in the application on your instagram account
Dear Sir,
I have a query. When I add a test phone number, it shows that the OTP has been sent successfully. However, when I add my personal number, it displays the message "Failed to send OTP." Could you please assist me with this issue?
To use real phone number you need to run the app on real device.
It wont work on emulator.
ohh, Thank you so much, it's working now 😍😍
Can you add functionality of sending images and make a video on it plz
Will try in new video.
I couldnt able to get the otp via mesaage it is showing otp verification failed what can i do
Check the exception message in Logcat.
Please help, my dear brother. When I reached this step: The test message did not arrive on Firebase. What is the solution, please?
Check the Logcat and let me know.
the logcat erro is " glUtilsParamSize: unknow param 0x000082da
@@EasyTuto1
when i try to use really number it doesn't sent me code on my phone number
@@EasyTuto1
the verification otp failed while running the app
I got error when i put otp and next is user name activity page put username and i click LET ME IN button not goto next page & hello world page & not store data firestore page please help me
Watch agin from the username but be focused
Sir there is a problem the message is storing on the server but not displaying as both both reciever and sender adapter is working fine there is no error in studio even I copy pasted your given code of chat recycler view , is there any wrong in chat activity??
Something is wrong in your code. Double check your code.
#patas
What version of android studio you are using can u please tell me?
As of today i am using Latest version Hedgehog.
I am getting OTP verification failed what to do ?
You have wrote 2.5.0 in dependency
What should i write now
Check the latest version.
its 08/02/2024 i working this project but i get issue my FirebaseAuth not sync please help me
Check you have added FirebaseAuth dependency.
01:01:05 Why is the username not reflected in the EditView text. When i input the phone number and otp, the username is blank eventhough there is data in the firebase firestore. Please help
Check the data key what is being stored in firebase its same in your project or not?
For getting data there might be some issue.
@@EasyTuto1 Sorry what i meant was. Im able to duplicate my username,uid,and phone number. Why is that?
Something is wrong in your code.
bhai jaise hi app open karte Hai aur profile section me jate hai ..app automatically close ho jata hai
Its crashing. Check the logcat.
Please the startTimer for resend OTP crashes my app it doesn't work
Also when i use a real number and get the otp and use it again i don't get the otp again
Please help
Something might be wrong in the code.
Check again.
Did you solve it I got the same problem
i got problem in re CAPTCHA while fetching in firebase , when i click on send otp there is not opening re CAPTCHA
@suryabikramshah8784 not so similar problem but I too am facing a problem , when putting the correct number , re Captcha is not showing, followed by "OTP Verification failed" toast
@@VaradNair did you solve the OTP once same problem for me
@@ramavivek5588 instead of that I'm using email verification
Hi sir. I am facing a small issue. During OTP verification, after the chrome page opens up for reCAPTCHA, my virtual device closes. Is there any solution for this? Thanks
Its crashing. Check the logcat for the cause.
Did you solve the error? I have the same problem.
Why does this not work on MIUI when ran without connecting usb to the phone, I mean after it has been installed to the phone
It should work
Same problem with 3 MIU phones
Hey, can anyone say which architectural pattern he used in this video !! Is it MVVM ? I want to learn with the MVVM. If its MVVM, then i will go through this video. Please let me know anyone.
There is not splash activity in my project 7:46
I didn't get the user details while searching the search user
Hello bro I have problem to uploading image picker in setting gradle from 2:56:20 , it is not syncing.
Bro is recent Chats is visible in your app ??
may be your version is old.
Try to add it in build.gradle (app level)
error: unexpected element found in .
sir please solve this arror
Check again, there might be some syntax issue < tag and > tag.
bro, I can’t implement dependency 14.54
Hello sir please help me i have tried everything each and every step in fact i have copy pasted code of your but when i open the aap recent chat user's are not display and whole my app is working fine message going and notifications working all the activity is working fine but
Recent chat users are not comming its showing blank screen
Check if it's crashing or you might have missed something.
same issue bro did you figure out something
please reply bro
@@EasyTuto1 bhai error aa rha hai isme recent chats show nhi ho rhe hai blank screen aa rhi hai please reply bro I am very close now
@@Yash-912 I haven't got any solution for that
It's only india that will work for selecting number and valid number? how to change it? can you help me?
You can add number of any country.
sir github project merge ho rehe hai what to do plz help
3:27:35
I can't enable cloud messaging 😢
Even if i add dependency of cloud firestore i dont get firestoreRecycleradapter
Remove dependency and add again open "Build" window to see weather the dependency is correctly downloaded.
Thank u it's worked
Great❤️
How can i get in touch with you? Because I tried your project but it failed. I want to ask you a few things.
Yeah you can ask me I'm running this app successfully
hi, i cant find the fcmtoken