How to Implement Firebase Push Notifications on Android (FCM + Backend)

  Рет қаралды 44,372

Philipp Lackner

Philipp Lackner

5 ай бұрын

In this video I'll show you how to implement Firebase Push Notifications on Android (FCM+Backend).
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
⭐ Courses with real-life practices
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/premium-courses/
Get my FREE PDF about 20 things you should never do in Jetpack Compose:
pl-coding.com/jetpack-compose...
Regular programming advice on my Instagram page: / _philipplackner_
Join my Discord server:
/ discord
Get the source code for this video on GitHub:
github.com/philipplackner/Fcm...

Пікірлер: 74
@tdrg_
@tdrg_ 3 ай бұрын
After 2 months of trying to figure this out, I found this. THANK YOU!
@sparshchadha5469
@sparshchadha5469 5 ай бұрын
Wohoooo needed this, thanks a lot Philipp!
@PeopleLetMe
@PeopleLetMe Ай бұрын
00:00 - Intro and Examples 05:01 - Adding a New Firebase Project 09:14 - PushNotificationService 13:30 - ChatState 14:43 - SendMessageDto & NotificationBody 17:42 - FcmApi 18:47 - ChatViewModel 25:34 - EnterTokenDialog 32:29 - ChatScreen 36:14 - MainActivity and Permissions 38:37 - Important Warning 39:13 - MainActivity and Permissions 40:46 - Testing 44:27 - Adding Broadcasting 46:07 - Backend and Ktor 1:00:33 - Testing and a Fixing Errors 1:05:42 - Outro
@allanandliftedhands2669
@allanandliftedhands2669 5 ай бұрын
Wow this was so timely for me...thank you very much
@engineerfred9427
@engineerfred9427 5 ай бұрын
Wow just when i needed it. Thanks
@mikelantzelo
@mikelantzelo 4 ай бұрын
Keep your excellent work. Thank you!
@_soulofgold
@_soulofgold 5 ай бұрын
You are the best bro, thanks!
@princepatel4864
@princepatel4864 5 ай бұрын
I'm learn so much for your video thank you so much
@treasuretechnology1266
@treasuretechnology1266 5 ай бұрын
Great one Philipp
@janak.khadka
@janak.khadka 4 ай бұрын
you are the great mentor!
@n_mckean
@n_mckean Ай бұрын
A video of this length really needs chapters to navigate through.
@baijusharma6027
@baijusharma6027 5 ай бұрын
Hey @Philipp, Your Android videos are really helpful ❤. Please create videos on Android Architect or system design.
@papprobert89
@papprobert89 5 ай бұрын
hey @Philipp. First of all thanks for the amazing content. If I have a project where I set up two different apps (acc, and prod) it's normal if I download the JSON file it's exactly the same? Thanks!
@MrMrusman2123
@MrMrusman2123 5 ай бұрын
Great learned server side coding in kotlin for the 1st time
@germenwong
@germenwong 5 ай бұрын
Excellent video, I am looking forward to a larger multi module FCM project and I will purchase it
@alexeypekarski409
@alexeypekarski409 2 ай бұрын
needed this!!!!!!!
@John-qt6qk
@John-qt6qk 4 ай бұрын
Amazing! Thanks
@toyyibbadmus
@toyyibbadmus 5 ай бұрын
Thanks bro.. Always delivering quality content. More grace to you
@souhailmarghabi4113
@souhailmarghabi4113 5 ай бұрын
Would love to know how to use fcm for a simpler app sync mechanism with data messages.
@hclpramod
@hclpramod 5 ай бұрын
You are tooo good brother , I like you 😊
@Elonmuskbrasileiro
@Elonmuskbrasileiro Ай бұрын
thank you bro, you is the best
@denihilhamsyah
@denihilhamsyah 3 ай бұрын
Hi Philipp great video, can you provide an example of how to inject a repository to the PushNotificationService class?
@freshtechtips
@freshtechtips 5 ай бұрын
There is a library for ktor clients, which makes the way to design your interface very similar to retrofit It's better to use ktor as it's multiplatform library
@Tuligarnio
@Tuligarnio 5 ай бұрын
I don't know how the resulting json looks like, but I think the problem of the "to" field at 1:03:10 could be fixed setting the kotlinx-serialization json like this: Json { explicitNulls = false }
@princepatel4864
@princepatel4864 5 ай бұрын
Thank you sir
@WajidKhan-po9pj
@WajidKhan-po9pj 2 ай бұрын
good keep it up
@sudhanshusharma9159
@sudhanshusharma9159 5 ай бұрын
Hi, Please don't take it negative. Your content is very useful. It help in learning + applying in project. But I feel that most often, you are in hurry. So watch in .75 plaback speed.
@muhammadsameeramjad9403
@muhammadsameeramjad9403 2 ай бұрын
Thank you
@ubbax
@ubbax 5 ай бұрын
Lovee you bro 🇮🇳
@user-pc5xz9oj6c
@user-pc5xz9oj6c 3 ай бұрын
can u do same video on java ... syntx of kotlin too complex for me
@rubinho388
@rubinho388 5 ай бұрын
Damn...literally yesterday I implemented the solution from the other video with ktor and onesignal... For now I'll leave as it is and on my next project I follow the new way shown in this video
@PhilippLackner
@PhilippLackner 5 ай бұрын
It's not a new way, it is what onesignal uses under the Hood. Onesignal is easier, but fcm is free :)
@MonichGPT
@MonichGPT 5 ай бұрын
Need to sync data between 2 devises, how to do that?
@prev_knowunique
@prev_knowunique Ай бұрын
thats really a very excellent one...but sir i had an issue, it's not working on real devices..how to troubleshoot n solve that problem. Please, Guide Sir..
@themykolas
@themykolas 4 ай бұрын
Your videos are amazing, only thing is you have a lot of clickbaity titles, which makes it harder to find the content i'm looking for :D But you do you if that makes for more engament!
@MaximaToluene
@MaximaToluene 3 ай бұрын
Hey Phil, mine is empty on the Service account tab for the json, what permissions do i need to have to get a key from there?
@emretaskran5483
@emretaskran5483 3 ай бұрын
The notification text is only in one line. How can I show the notification text in multiple lines? The notification text is like this "Arkadaşlarına söylemeyi sakın unutm..."
@henrik908
@henrik908 5 ай бұрын
Hello Philipp I am working on a app I am trying to make it as much as responsive possible but the main problem is with the Text Like I am useing WindowSizeClass to Change Font Size and Everything based on the Device size. but their is a problem Like when I am changing Text Size of my device from the settings Text Scales and that makes Ui look bad I have seen one of your video where you maked an AutoResizeText I tried using that but that wasn't looking good I mean user can see the changes so please is their is any way to turn off Device Text Size settings from effecting my app's Text ? I mean what to do ?
@neerajverma9226
@neerajverma9226 4 ай бұрын
Great. but how to handle on tap notification click?
@brandonbailey4491
@brandonbailey4491 4 ай бұрын
Is this possible with a native library like react-native or expo?
@evgenyplaksin2380
@evgenyplaksin2380 3 ай бұрын
It does actually work on an emulator without being logged in your account, at least for me
@kirwakelvinkering3122
@kirwakelvinkering3122 5 ай бұрын
Thanks Galore air , I wish you come though his message and help me where am stuck . I want to do the same and my phone is android version 11 , how is this possible ?
@user-xl6mn6zj7p
@user-xl6mn6zj7p 4 ай бұрын
Is it possible to add action button while the app is in background
@user-hj6gg4iq5p
@user-hj6gg4iq5p 5 ай бұрын
Could you pls record a new video about "dynamic feature module" and "library feature module"?
@milchschlumpf9809
@milchschlumpf9809 5 ай бұрын
I would like to see a tutorial how to localize the notification message. Since you can change the language per app in android now, my device could be in german and the app in english
@giuliopimenoff
@giuliopimenoff 5 ай бұрын
is this a new Android stuff setting? any reference
@giuliopimenoff
@giuliopimenoff 5 ай бұрын
you would probably just need to store the user language preference in the backend
@garrysingh4484
@garrysingh4484 5 ай бұрын
☝️ Can you make a complete, most up-to-date, beginners friendly mini course or video about "Services" !!! - Background services - Foreground services - Bound Services etc.
@TheRcfrias
@TheRcfrias 25 күн бұрын
What about the white circle and the Miscellaneous channel being used when the app is in the background? Couldn't find any explanation to this.😮‍💨
@ojasvisingh786
@ojasvisingh786 5 ай бұрын
👏👏
@doctorpizza8518
@doctorpizza8518 4 ай бұрын
is this free / compatible with free plan
@chiragrathore6218
@chiragrathore6218 2 ай бұрын
is FCM is free completely ? i want to use it for commercial app.
@germenwong
@germenwong 5 ай бұрын
Why is my device not displaying a message? I have logged into my Google account on the device and the ktor server has not reported an error
@lglf77
@lglf77 Ай бұрын
I have a doubt. But I don't know if you put it on You Tube. I had read in the fitebase documentation that the application installation token, with each installation, reinstallation or removal of the application, the token CHANGES, causing the same user to have that abusive behavior of offending people or abusing deconstructive criticism. In other words, it is not acceptable to let a user post fake news in the app's News Feed or comments. Is there any chance of a single account, or maximum two user accounts per user registration in the application without the application first communicating with firebase? For example, the user will only be able to register a single account, or a maximum of 2 registrations per device and wait for authorization to access the internal content. I am saddened by the fact that the user makes 10 accounts with a Google token to perform different logins on a same application.
@adityagiri4906
@adityagiri4906 17 күн бұрын
My question is that , how i deploy this ktor server like normal server ?
@MonichGPT
@MonichGPT 5 ай бұрын
Please make course about Ktor
@manticomar1146
@manticomar1146 4 ай бұрын
Isn't it much easier to implement a cloud function on firebase than doing it thru ktor?
@user-vb9gp9ly1x
@user-vb9gp9ly1x 4 ай бұрын
How to do this?
@pikup2003
@pikup2003 12 күн бұрын
fcm image or logo not showing when app is close
@amenayari5026
@amenayari5026 2 ай бұрын
thx all that is good but http legacy i don't use kthor server firbase bakend do that automaticlly it is simple with retrofit why httpv1 i should use this khtor server if in doc android i request google api directly as http legacy with accesstoken
@user-nc1ok5kf1s
@user-nc1ok5kf1s 8 күн бұрын
how can i make my host in FCM
@srimanikanta1493
@srimanikanta1493 5 ай бұрын
Video request: how to connect mongodb and Android with kotlin. Multiplayer tic tac toe game. Pls * 1000
@user-hp5yk3kf7s
@user-hp5yk3kf7s 3 ай бұрын
someone else knows how to do push notifications in multi language? thanks
@zakirmagide8889
@zakirmagide8889 2 ай бұрын
could you explain this in java
@ACA981
@ACA981 5 ай бұрын
Can wait for the premium course @PhilippLackner
@faheemahmadofficial7701
@faheemahmadofficial7701 5 ай бұрын
Flutter please
@thedarkknight1865
@thedarkknight1865 5 ай бұрын
First 🥇
@gill270
@gill270 Ай бұрын
copy error
@dev_sonu
@dev_sonu 5 ай бұрын
second 😀
@NikhilTalmale-ld8tw
@NikhilTalmale-ld8tw 2 ай бұрын
ia am getting this error after adding plugin and dependencies Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services', version: '4.4.1', apply: false] was not found in any of the following sources:
The Top 3 State Management Mistakes On Android
14:30
Philipp Lackner
Рет қаралды 21 М.
WorkManager - Android Basics 2023
34:22
Philipp Lackner
Рет қаралды 49 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 19 МЛН
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Рет қаралды 31 М.
Type-Safe Navigation with the OFFICIAL Compose Navigation Library
10:03
📱Android Push Notifications • Flutter x Firebase Tutorial
12:39
How to Implement Biometric Auth in Your Android App
22:32
Philipp Lackner
Рет қаралды 14 М.
Firebase Send Push Notification JavaScript + PHP
27:22
benixal
Рет қаралды 8 М.
Send Push Notifications with FCM using C# (Topics & Tokens)
21:14
Gerald Versluis
Рет қаралды 46 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2 МЛН
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 35 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 7 МЛН