Push Notification Activity Triggers - Android Firebase

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Push Notification Activity Triggers - Android Firebase
    In this video I show you how to open a specific screen in your app when the user clicks on a push notification. The notification is send from the Google App "Postman" since the Firebase console doesn't have that functionality. I also go over how to use Postman.
    Firebase features:
    -Store Real-Time data
    -Set up users with various logins from Facebook, Email, Twitter, Google, Github etc..
    -Use Cloud Messenging
    -Image and Video Storage
    -Web Hosting
    -Push Notifications,
    -Google AdWords
    And MORE!
    Honestly I think Firebase is pretty amazing. It's just yet another great product from google. It's very easy to use and has so much functionality.
    Watch my videos and learn how to use Firebase FREE!
    ➤Firebase Tutorial Playlist:
    ↻ goo.gl/T9Wp2f
    ➤Source Code:
    ↻github.com/mit...
    ➤Firebase Cloud Messaging Doc:
    ↻firebase.googl...
    ➤Firebase Github Examples:
    ↻github.com/fir...
    ➤Firebase Link:
    ↻firebase.googl...
    ➤My Keyboard:
    ↻ goo.gl/1RUqgb
    ➤My Microphone:
    ↻ goo.gl/mPh3dk
    ➤Check out our website:
    ↻ www.CodingWithM...

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

  • @shahzebmushtaq1297
    @shahzebmushtaq1297 5 лет назад +5

    sir can you please tell how to open a particular fragment when the notification is clicked

  • @adielmoran6986
    @adielmoran6986 2 года назад

    thanks bro you save my life

  • @kush.5904
    @kush.5904 6 лет назад +4

    is there a way to automate the process on an event rather than manually sending the notification via server?

  • @devappsworld2256
    @devappsworld2256 6 лет назад

    This is really awesome. Thanks. I got this favorite.

  • @Zahirul3
    @Zahirul3 5 лет назад +2

    Hi, Thanks for your nice tutorial about push notification. Could you also make a video/ help how I can launch an app automatically when a new notification arrive without user click on notification? I am expecting it will work like a video/audio calling app work. when I user call to someone it opens the app and start ringing. e.g. skype, whatsapp

    • @kuldeep_thakur
      @kuldeep_thakur 5 лет назад

      Did you find the solution? I also need that.

  • @mekabiz90
    @mekabiz90 7 лет назад +2

    In Postman, Under Headers, Authorization: key=AAAA.....
    HAVE TO ADD "key=" in front of the Firebase Server key token!!!

  • @Dasesoft
    @Dasesoft 7 лет назад

    Excellent, SoapUI also works for test this API.

  • @Tecnitr0nic
    @Tecnitr0nic 6 лет назад +1

    Amazing tutorial, it could have been perfect if you had included tokens instead of just add a topic, since the most difficult part is actually the token thing.
    Thank you.

    • @Tecnitr0nic
      @Tecnitr0nic 6 лет назад

      Thanks

    • @Tecnitr0nic
      @Tecnitr0nic 6 лет назад

      It does not allows me to see the course. It is a web page to start a free 10 days trial

  • @Proloyable
    @Proloyable 7 лет назад

    Hello Mitch, Your tutorial is really awesome. But i have noticed a problem that if the app is closed then the notification is not coming. Is this a device specific issue? .... Again, Thanks for the tutorial!!!

  • @GouGoune96
    @GouGoune96 5 лет назад

    It's working really fine, thx !

  • @orhanavan7222
    @orhanavan7222 5 лет назад +1

    Hey Mitch you are awesome coder ! Thanks for solution.
    But I have a question: How do I automatise it? Maybe, daily 11:00 PM

    • @codingwithmitch
      @codingwithmitch  5 лет назад

      I'd probably build a cloud function that sends something out every day at whatever time

  • @xy-joetechstudios6033
    @xy-joetechstudios6033 7 лет назад

    Hey Mitch, nice video, i really loved it, but i need to ask, Is there a way of writing a code to customize the notification sent to a particular user. For example, say i follow someone, he/she gets a notification about a new user follow (Something like facebook friend request notification)

  • @abdulkhaliqseddiqi1334
    @abdulkhaliqseddiqi1334 7 лет назад

    Hey man it was really useful Tnx so much it helped me a lot

    • @abdulkhaliqseddiqi1334
      @abdulkhaliqseddiqi1334 7 лет назад

      Hi, Buddy, I hope you do well!
      This video helped me a lot but I faced another problem that I want to open a fragment inside a tabbed view, and the of this video just works for opening an activity please if you can help me
      TNX in advance

    • @abdulkhaliqseddiqi1334
      @abdulkhaliqseddiqi1334 7 лет назад

      The desired fragment that I want to start is in a Tablayout (There are 5 fragments added to it) and I want to start the third one if you sure that your fragment tutorial will help me please send me the links.
      again TNX in advance

  • @clearwavepro100
    @clearwavepro100 7 лет назад

    I couldn't capture the notification into the app where I wanted to keep copies of the previous notifications.
    I think you pointed out that I needed to make a json object, or was that only just for messages received that were not sent from the firebase console?
    Thank you much btw!!

  • @AviPars
    @AviPars 7 лет назад

    I appreciate this video! thank you

  • @christosliotiris1321
    @christosliotiris1321 7 лет назад

    Mitch your video is by far the best !!
    Is there any possibility to launch an application (google maps for example) by clicking the notification ??
    Sorry for asking but i am newbie !!

  • @pclcrc3538
    @pclcrc3538 6 лет назад +1

    Can u add image in this code. Notification with image in same code

  • @takiuddin93
    @takiuddin93 7 лет назад +1

    hey Mitch, i have your tutorial is great. just make an app using this. But i used fragments in my app and when i integrated this method, it doesn't do anything. could you help be please?

    • @sukutforum4981
      @sukutforum4981 2 года назад

      I have the same problem. Did you find a solution?

  • @christosliotiris1321
    @christosliotiris1321 7 лет назад

    Hi,
    great tutorial but i am facing a problem on building the app..
    i am using Android Studio 2.3.2 !!!
    Any suggestions ??

  • @mehmtkyar
    @mehmtkyar 6 лет назад

    Thanks ... Great job..

  • @athma2758
    @athma2758 6 лет назад

    Thanks CodingWitchSnitch, you're lifesafer

  • @gusri2745
    @gusri2745 7 лет назад +1

    thx. but, At app close/background. notification Disappears in a few seconds n sound not working.
    app work just a foreground condition.
    please help

    • @TheTiku1987
      @TheTiku1987 7 лет назад

      I am seeing the same issue. Can you please help?

  • @ghourabidhia2862
    @ghourabidhia2862 7 лет назад

    thanks master you are the best

  • @shababkm1803
    @shababkm1803 6 лет назад

    nice sir , i like it , i have a dout , please tell me .. !
    Send A Notification user click the notification open a activity ,
    Now i Want to open Activity show the Notification Titile and Text , Please Help me

  • @alanhenry4585
    @alanhenry4585 5 лет назад

    Bro. I am creating an app where the login page leads to two different activities based on whether u r an admin or not. The admin should have the ability to send a notification to everybody who is having the be it an admin or not. I want to ability to send the notification within the app itself. How should I proceed?

  • @sandylaluw8032
    @sandylaluw8032 6 лет назад

    do you have to use postman to do this? to open a certain activity? can you do it without using the postman?

  • @jupiterjs031
    @jupiterjs031 6 лет назад

    Thanks!

  • @nitro5152
    @nitro5152 5 лет назад

    sir i have add the pending intent to the notification object but my splash screen also have intent which starts the mainactivity1 but i want to start mainactivity2 from a firebase pushnotification please help sir....

  • @sparklingapps9397
    @sparklingapps9397 6 лет назад

    Thanks

  • @vishalmishra1937
    @vishalmishra1937 4 года назад

    can we change the activity based on changing title in firebase

  • @massimilianocoppola4911
    @massimilianocoppola4911 4 года назад

    there is a way to open the app from fcm without clicking notification in android 8?

  • @bhushandhapodkar7577
    @bhushandhapodkar7577 4 года назад

    Which tool you are using to send this data. I am not getting it. please tell me

  • @clasherclash3555
    @clasherclash3555 6 лет назад

    Bro how can I show this triggered firebase notifications in android Recyclerview activity

  • @szee3372
    @szee3372 6 лет назад +1

    Hey can u please tell me. How did u send message from fcm. My fcm is totally different and I didn't find title, text, message etc in it how can i check it please rply

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      hey
      There's a lot of nuances with Cloud messaging and notifications. It's a very difficult concept to get a good grasp of. I suggest watching my Pluralsight course on Cloud Messaging and Cloud Functions. Here's the link: goo.gl/tK3vwu
      Watch it free with this: pluralsight.pxf.io/c/1194789/424552/7490
      I also wrote this article that you might find helpful: codingwithmitch.com/android/61/
      But the course will be best.

    • @szee3372
      @szee3372 6 лет назад

      how did u send notification from fcm in this video. I need the link

    • @szee3372
      @szee3372 6 лет назад

      did u send from Realtime Database???? I don't need coding i just want to know about ur last step sending message from fcm

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      s zee it's using postman

  • @vaithiebby2198
    @vaithiebby2198 6 лет назад

    Can you tell me How can i save the notification when user not clicked it

  • @jonah3037
    @jonah3037 4 года назад

    how to display push notification in another activity ?

  • @marvinjaysamalca4988
    @marvinjaysamalca4988 6 лет назад

    Hey sir.. how can we make notofication with sound? do we have to modify the HTTP? the json like structure.. how?

    • @marvinjaysamalca4988
      @marvinjaysamalca4988 6 лет назад

      You see sir, let me explain what app im trying to build here. im making a ordering app which has 2 sides, the Client side and the Server Side, the Server side gets notification if a Client or user orders something, and the server side when updating the status of the order, the client will be also notified.. and both have raw payloads to make notification..
      and heres the problem.. when the app is running both sides are good on having notification with sounds. but when the app is closed, terminated, or in the background both can receive notification though, but with no sounds.. :D :D

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      Ventex Sauce yep. There's a lot of nuances when it comes to push notifications and cloud messaging. Each of those scenarios you described are slightly different. You should watch my cloud messaging and cloud functions course on Pluralsight: www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting
      Watch it free with this link: pluralsight.pxf.io/c/1194789/424552/7490

  • @abhinayshrivastav8739
    @abhinayshrivastav8739 6 лет назад

    Hey, anybody here, it's urgent..
    I want to open custom fragment on click of the notification icon.
    I have made a fragment that can be opened from 3 different activities, and want to open that fragment when ever the fcm notification is clicked and want to go back to that activity on which I want to.

  • @nuttygeek3798
    @nuttygeek3798 6 лет назад

    it's not working when app is in background or app is killed , i see main activity but not another activity .. and i am not handling intent in main activity ..
    we can get notification data message in any activity other than main activity , right ? (even when the app is in background/killed )

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      There's a lot of nuances with Cloud Messaging. I recommend watching my course on Cloud Messaging and Cloud Functions: app.pluralsight.com/library/courses/android-firebase-cloud-messaging-storage-crash-reporting/table-of-contents.
      Watch it free with this: pluralsight.pxf.io/c/1194789/424552/7490

  • @teddyheriyanto7116
    @teddyheriyanto7116 7 лет назад

    its only working if we open the apps, but didn't working when apps is close

  • @durgeshpawar616
    @durgeshpawar616 5 лет назад

    this works fine only if app is minimize? I want always on notification click work. im sending notification with 'data'

    • @codingwithmitch
      @codingwithmitch  5 лет назад

      Watch my course on push notifications, cloud messaging, and cloud functions. I show you how to send and receive push notifications in the background, foreground, and when the app is closed. www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting

  • @kumarbakkolla3810
    @kumarbakkolla3810 6 лет назад

    Hi sir
    can you tell me how to open mobile message app when user click on a push notification

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      Thats not a simple thing to do. I suggest watching my cloud messaging and cloud functions course on Pluralsight. www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting

  • @aayushpathak6365
    @aayushpathak6365 7 лет назад

    what do I place in "to:""/topis/AndroidNews" in postman body part??

    • @aayushpathak6365
      @aayushpathak6365 7 лет назад

      /topics/AndroidNews is it sane for every one ??

  • @takiuddin93
    @takiuddin93 6 лет назад

    hey Mitch, I have used Fragments in my application. But at 4:50 you said I need to declare each activity. How to i fix it to use my fragments?

    • @takiuddin93
      @takiuddin93 6 лет назад

      I have done it all..but when I send a push notification to open a fragment, it always ends up in the mainactivity.

    • @takiuddin93
      @takiuddin93 6 лет назад

      Thanks a lot. Will look into it..:D

  • @umarfarooq-ir7wc
    @umarfarooq-ir7wc 6 лет назад

    How to send notification to 2nd app when data is post by one app

    • @codingwithmitch
      @codingwithmitch  6 лет назад

      umar farooq You should watch my cloud messaging and cloud functions course on Pluralsight: www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting
      Watch it free with this link: pluralsight.pxf.io/c/1194789/424552/7490

  • @rixwankhan8803
    @rixwankhan8803 5 лет назад

    It doesn't work when the app is minimized or closed which pretty much makes it useless. Anybody has solved this problem?

    • @codingwithmitch
      @codingwithmitch  5 лет назад

      Yeah watch my full length course on cloud messaging.
      I show you how manage what happens when the app is in the background, foreground, and closed.
      Firebase Cloud Messaging, Cloud Functions and Crashlytics: app.pluralsight.com/library/courses/android-firebase-cloud-messaging-storage-crash-reporting/table-of-contents
      Pluralsight free trial: goo.gl/BJp7dE

  • @syedsalman5364
    @syedsalman5364 7 лет назад

    Thanks but it's not working when app is closed.. Please help..

    • @TheTiku1987
      @TheTiku1987 7 лет назад

      Did you find a solution to this?

    • @syedsalman5364
      @syedsalman5364 7 лет назад

      yeah, in Huawei phones, you need to mark you app as "Protected" in setting --> Advance Settings --> Bettery Manager --> Protected Apps

  • @bouidasafoine6756
    @bouidasafoine6756 7 лет назад

    i installed postMan but i can't open the body

    • @meetsamseen
      @meetsamseen 7 лет назад

      You'll have to click on the radio button named "raw".

  • @kannada-technewz
    @kannada-technewz Год назад

    I guess no one gonna delete email id here.... You post here in

  • @mantasjakstas849
    @mantasjakstas849 7 лет назад +1

    Everthing works fine , but I dont know how to use de HTTP post Reequest and send the notification from there..
    Do you have any tutorial about that?
    Thank you

    • @mantasjakstas849
      @mantasjakstas849 7 лет назад

      Now it works , I send the post and I receive the notification . But I can open the activity only when the app is running. If the app is closed i can't open, don't react , nor the app opens
      THANK YOU

    • @durgeshpawar616
      @durgeshpawar616 5 лет назад

      @@mantasjakstas849 facing same problem. Any solution if you have?

    • @mantasjakstas849
      @mantasjakstas849 5 лет назад +1

      @@durgeshpawar616 I don't found the solution , but for this kind of things is called DEEPLINKING

    • @durgeshdilippawar
      @durgeshdilippawar 5 лет назад

      @@mantasjakstas849 thanks for replying.
      i'm using firebase deep linking. Still have some problems. I'll sort out soon.

    • @mantasjakstas849
      @mantasjakstas849 5 лет назад +1

      @@durgeshdilippawar If you get the solution, please let me know.

  • @internetthingz8641
    @internetthingz8641 5 лет назад

    I followed your code from this video "Push Notification Activity Triggers - Android Firebase". My question is how do I open "SOMEACTIVITY" upon receiving notification sent from POSTMAN while App was killed/closed? I can receive the notification and open desired activity when App is running and in the background but when the notification is received when App is closed/killed, click action does not open any activity at all.

    • @codingwithmitch
      @codingwithmitch  5 лет назад

      Ya it's different if the app is closed or in background. I have a Pluralsight course that shows you how to do that.
      www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting
      Watch it free with this goo.gl/Ty7CZ5

  • @fathoni8
    @fathoni8 5 лет назад

    Hi, I tested the code but if app was closed it did't receive notifications. it only received notification while app was in foreground and background. Tested using Android 6.0.1/API 23

    • @codingwithmitch
      @codingwithmitch  5 лет назад

      I have a course on push notifications, cloud messaging and cloud functions. I show you how to receive push notifications in the 3 different app states: closed, background and foreground. Here is the link and a free trial link for pluralsight if you don't want to pay.
      course: www.pluralsight.com/courses/android-firebase-cloud-messaging-storage-crash-reporting
      Pluralsight free trial: goo.gl/BJp7dE
      OR I have a blog post you can follow: codingwithmitch.com/blog/android-firebase-cloud-messages-cloud-function/