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

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 94

  • @PeopleLetMe
    @PeopleLetMe 8 месяцев назад +26

    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

  • @tdrg_
    @tdrg_ 9 месяцев назад +6

    After 2 months of trying to figure this out, I found this. THANK YOU!

  • @n_mckean
    @n_mckean 7 месяцев назад +7

    A video of this length really needs chapters to navigate through.

  • @souhailmarghabi4113
    @souhailmarghabi4113 11 месяцев назад +12

    Would love to know how to use fcm for a simpler app sync mechanism with data messages.

  • @toyyibbadmus
    @toyyibbadmus 11 месяцев назад +7

    Thanks bro.. Always delivering quality content. More grace to you

  • @Tuligarnio
    @Tuligarnio 11 месяцев назад

    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
    }

  • @sparshchadha5469
    @sparshchadha5469 11 месяцев назад +3

    Wohoooo needed this, thanks a lot Philipp!

  • @sudhanshusharma9159
    @sudhanshusharma9159 11 месяцев назад +4

    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.

  • @allanandliftedhands2669
    @allanandliftedhands2669 11 месяцев назад +3

    Wow this was so timely for me...thank you very much

  • @papprobert89
    @papprobert89 11 месяцев назад +2

    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!

  • @princepatel4864
    @princepatel4864 11 месяцев назад +3

    I'm learn so much for your video thank you so much

  • @luckydevil1601
    @luckydevil1601 6 месяцев назад

    wow amazing as usual! yes, would be great to see a larger scale project with these features🥰

  • @engineerfred9427
    @engineerfred9427 11 месяцев назад +1

    Wow just when i needed it. Thanks

  • @SolarSargodha
    @SolarSargodha 11 месяцев назад +1

    Great
    learned server side coding in kotlin for the 1st time

  • @_soulofgold
    @_soulofgold 11 месяцев назад +3

    You are the best bro, thanks!

  • @MonichGPT
    @MonichGPT 11 месяцев назад +2

    Need to sync data between 2 devises, how to do that?

  • @mikelantzelo
    @mikelantzelo 10 месяцев назад +1

    Keep your excellent work. Thank you!

  • @freshtechtips
    @freshtechtips 11 месяцев назад

    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

  • @treasuretechnology1266
    @treasuretechnology1266 11 месяцев назад +1

    Great one Philipp

  • @denihilhamsyah
    @denihilhamsyah 9 месяцев назад

    Hi Philipp great video, can you provide an example of how to inject a repository to the PushNotificationService class?

  • @baijusharma6027
    @baijusharma6027 11 месяцев назад +1

    Hey @Philipp,
    Your Android videos are really helpful ❤.
    Please create videos on Android Architect or system design.

  • @henrik908
    @henrik908 11 месяцев назад

    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 ?

  • @شرحتطبيقالاعلافالبديلة
    @شرحتطبيقالاعلافالبديلة 9 месяцев назад +1

    can u do same video on java ... syntx of kotlin too complex for me

  • @ngolian
    @ngolian 5 месяцев назад

    Does this include information about how to use a custom sound effect? I can't get that working in my app.

  • @janak.khadka
    @janak.khadka 11 месяцев назад +1

    you are the great mentor!

  • @germenwong
    @germenwong 11 месяцев назад

    Excellent video, I am looking forward to a larger multi module FCM project and I will purchase it

  • @emretaskran5483
    @emretaskran5483 10 месяцев назад +1

    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..."

  • @MaximaToluene
    @MaximaToluene 9 месяцев назад

    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?

  • @neerajverma9226
    @neerajverma9226 10 месяцев назад +1

    Great. but how to handle on tap notification click?

  • @benedictcontawe3355
    @benedictcontawe3355 5 месяцев назад

    do you have link on how to create the backend for Node.Js for this one

  • @prev_knowunique
    @prev_knowunique 8 месяцев назад

    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..

  • @brandonbailey4491
    @brandonbailey4491 11 месяцев назад

    Is this possible with a native library like react-native or expo?

  • @TheRcfrias
    @TheRcfrias 7 месяцев назад

    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.😮‍💨

  • @kirwakelvinkering3122
    @kirwakelvinkering3122 11 месяцев назад

    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 ?

  • @lglf77
    @lglf77 8 месяцев назад

    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.

  • @hclpramod
    @hclpramod 11 месяцев назад

    You are tooo good brother , I like you 😊

  • @alexeypekarski409
    @alexeypekarski409 8 месяцев назад

    needed this!!!!!!!

  • @rubinho388
    @rubinho388 11 месяцев назад

    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  11 месяцев назад +2

      It's not a new way, it is what onesignal uses under the Hood. Onesignal is easier, but fcm is free :)

  • @Nick-v8x
    @Nick-v8x 11 месяцев назад

    Could you pls record a new video about "dynamic feature module" and "library feature module"?

  • @milchschlumpf9809
    @milchschlumpf9809 11 месяцев назад

    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 11 месяцев назад

      is this a new Android stuff setting? any reference

    • @giuliopimenoff
      @giuliopimenoff 11 месяцев назад

      you would probably just need to store the user language preference in the backend

  • @RajatGubrele
    @RajatGubrele 10 месяцев назад

    Is it possible to add action button while the app is in background

  • @germenwong
    @germenwong 11 месяцев назад

    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

  • @themykolas
    @themykolas 10 месяцев назад

    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!

  • @IZOBLOX
    @IZOBLOX 3 месяца назад

    Hi plcoding this is amazing 💯 could you do the same for firebase in app messaging.
    how to modify behaviour of firebase in app messages things like click and sending messages programmatically

  • @frestalink
    @frestalink 4 месяца назад

    Please make a video on this topic "Firebase Send Push Notification Android + PHP"

  • @ACA981
    @ACA981 11 месяцев назад +1

    Can wait for the premium course @PhilippLackner

  • @Elonmuskbrasileiro
    @Elonmuskbrasileiro 8 месяцев назад

    thank you bro, you is the best

  • @adityagiri4906
    @adityagiri4906 7 месяцев назад

    My question is that , how i deploy this ktor server like normal server ?

  • @garrysingh4484
    @garrysingh4484 11 месяцев назад +1

    ☝️ Can you make a complete, most up-to-date, beginners friendly mini course or video about "Services" !!!
    - Background services
    - Foreground services
    - Bound Services
    etc.

  • @John-qt6qk
    @John-qt6qk 11 месяцев назад

    Amazing! Thanks

  • @MadhanMohanUppanamoni
    @MadhanMohanUppanamoni Месяц назад

    Does this notifications received when the app is in background

  • @empiregood9225
    @empiregood9225 4 месяца назад

    I don't understand composer. Can anyone do it in standard Kotlin that replaced Java?

  • @usertamalou
    @usertamalou 4 месяца назад

    How to handle a push notification app in a closed or kill state?

  • @doctorpizza8518
    @doctorpizza8518 10 месяцев назад

    is this free / compatible with free plan

  • @chiragrathore6218
    @chiragrathore6218 9 месяцев назад

    is FCM is free completely ? i want to use it for commercial app.

  • @amenayari5026
    @amenayari5026 9 месяцев назад

    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

  • @MichelleRaouf-x6m
    @MichelleRaouf-x6m 3 месяца назад

    How get data fcm in background after clicked notification

  • @manticomar1146
    @manticomar1146 11 месяцев назад

    Isn't it much easier to implement a cloud function on firebase than doing it thru ktor?

  • @طهمحمديونس-ذ1ل
    @طهمحمديونس-ذ1ل 6 месяцев назад

    how can i make my host in FCM

  • @evgenyplaksin2380
    @evgenyplaksin2380 9 месяцев назад

    It does actually work on an emulator without being logged in your account, at least for me

  • @pikup2003
    @pikup2003 6 месяцев назад

    fcm image or logo not showing when app is close

  • @ameyaaadhi1975
    @ameyaaadhi1975 3 месяца назад

    😢 my old push notification not work

  • @nicedoodly6392
    @nicedoodly6392 4 месяца назад

    if anybody notification is not showing then chill bro its working on real device

  • @rajaryan9436
    @rajaryan9436 5 месяцев назад

    Can u make in java

  • @WajidKhan-po9pj
    @WajidKhan-po9pj 9 месяцев назад

    good keep it up

  • @ubbax
    @ubbax 11 месяцев назад

    Lovee you bro 🇮🇳

  • @MonichGPT
    @MonichGPT 11 месяцев назад

    Please make course about Ktor

  • @princepatel4864
    @princepatel4864 11 месяцев назад

    Thank you sir

  • @zakirmagide8889
    @zakirmagide8889 9 месяцев назад

    could you explain this in java

  • @muhammadsameeramjad9403
    @muhammadsameeramjad9403 8 месяцев назад

    Thank you

  • @ÁngelCortés-s5g
    @ÁngelCortés-s5g 10 месяцев назад

    someone else knows how to do push notifications in multi language? thanks

    • @muhammadkurbonov4779
      @muhammadkurbonov4779 6 месяцев назад

      Do you find some helpfull material ? I need it too

    • @ÁngelCortés-s5g
      @ÁngelCortés-s5g 6 месяцев назад

      @@muhammadkurbonov4779 hey bro, what worked for me was created two strings for push notifications. On your files strings you need to declare two strings: one string for title notification, one for message notifications. sorry for my bad english

  • @srimanikanta1493
    @srimanikanta1493 11 месяцев назад

    Video request: how to connect mongodb and Android with kotlin. Multiplayer tic tac toe game.
    Pls * 1000

  • @faheemahmadofficial7701
    @faheemahmadofficial7701 11 месяцев назад

    Flutter please

  • @gill270
    @gill270 7 месяцев назад

    copy error

  • @ojasvisingh786
    @ojasvisingh786 11 месяцев назад

    👏👏

  • @JoannWaiters-i4b
    @JoannWaiters-i4b 3 месяца назад

    Jesse Views

  • @AdrianScottty
    @AdrianScottty 3 месяца назад

    Lopez Barbara Lee Margaret Gonzalez Ruth

  • @roseesefitzgerald4404
    @roseesefitzgerald4404 3 месяца назад

    Walker Carol Lee Scott Jones Maria

  • @thedarkknight1865
    @thedarkknight1865 11 месяцев назад

    First 🥇

  • @dev_sonu
    @dev_sonu 11 месяцев назад

    second 😀

  • @NikhilTalmale-ld8tw
    @NikhilTalmale-ld8tw 9 месяцев назад

    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:

  • @KarenYoung-o3o
    @KarenYoung-o3o 3 месяца назад

    25096 Koss Island