Fireship · @fireship

Smart Push Notifications with Flutter & FCM

Uploaded June 13, 2019 · Length 11:10

Smart Push Notifications with Flutter & FCM

Summary

Learn how to send smart push notifications with Flutter and Firebase Cloud Messaging, including segmenting users, subscribing to topics, and sending notifications to individual devices.

  • flutter push notifications
  • firebase cloud messaging
  • android push notifications
  • ios push notifications
  • segmenting users
  • firebase predictions
  • notification topics
  • individual device notifications

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    when used correctly push notifications

  2. 0:02

    can be an extremely powerful way to

  3. 0:03

    drive user engagement but when used

  4. 0:05

    incorrectly they can do the exact

  5. 0:06

    opposite and drive users to uninstall

  6. 0:08

    your app luckily there's a service

  7. 0:10

    called firebase cloud messaging that

  8. 0:11

    allows you to be smart about the way you

  9. 0:13

    broadcast notifications to your users

  10. 0:15

    take it from me be smart be safe in

  11. 0:18

    today's video you'll learn how to

  12. 0:20

    receive messages from a front-end

  13. 0:22

    flutter app and also how to broadcast

  14. 0:23

    them from a back-end cloud function

  15. 0:25

    we'll look at how to broadcast

  16. 0:26

    notifications to a single device or user

  17. 0:29

    to a topic or to a segment of your user

  18. 0:31

    base based on the analytics data that

  19. 0:33

    you collect by the end of this video

  20. 0:34

    you'll be able to combine these

  21. 0:36

    techniques together to create a

  22. 0:37

    sophisticated pipeline for app

  23. 0:39

    notifications if you're new here like

  24. 0:41

    and subscribe and you can find the full

  25. 0:42

    source code on fire ship IO and congrats

  26. 0:45

    to mateo Petrovich your last week's

  27. 0:46

    t-shirt winner but there will be another

  28. 0:48

    giveaway with this video all you have to

  29. 0:49

    do is leave a comment below now before

  30. 0:51

    we get into the actual source code let's

  31. 0:53

    talk about the three main ways that you

  32. 0:54

    can send push notifications with

  33. 0:56

    firebase Cloud messaging the most broad

  34. 0:58

    approach is to send a notification to a

  35. 1:00

    segment of your users this could be as

  36. 1:02

    broad as all the users for your Android

  37. 1:04

    app but typically you're going to drill

  38. 1:06

    down to a smaller audience for example

  39. 1:08

    you might want to target all of your

  40. 1:09

    Korean Android users whose last app

  41. 1:11

    engagement was more than ten days ago

  42. 1:13

    and that will tell you exactly how many

  43. 1:14

    users will receive this notification as

  44. 1:16

    well as their relative size to the total

  45. 1:18

    user base on top of that you can use

  46. 1:20

    firebase predictions to dynamically

  47. 1:22

    segment your users and send

  48. 1:23

    notifications based on the type of

  49. 1:24

    engagement you're trying to get and that

  50. 1:26

    means you can just fire the UX person

  51. 1:27

    who's in charge of doing this manually

  52. 1:29

    and like google's AI handle it what are

  53. 1:31

    you getting fire me

  54. 1:32

    no I already why are you still here

  55. 1:39

    another option is to manually subscribe

  56. 1:41

    a user to a notification topic this is

  57. 1:44

    useful if you want a user to opt into a

  58. 1:46

    certain topic or if you want to

  59. 1:47

    programmatically assign them to a topic

  60. 1:49

    in the background of your app for

  61. 1:51

    example a user might follow a certain

  62. 1:53

    category like puppies so you want to

  63. 1:55

    subscribe them to puppy notifications in

  64. 1:57

    the third and most personalized way to

  65. 1:59

    send notifications is to send them to a