Setup Push Notifications in your Expo App

  Рет қаралды 33,319

Dan's React Native Lab

Dan's React Native Lab

Күн бұрын

Пікірлер: 158
@DanRNLab
@DanRNLab 6 ай бұрын
IMPORTANT NOTES: If you run into trouble in release mode the next place to look for help would be the Expo discord server. I've tested this code in release mode and it works on my end - discord.com/invite/expo If you want to learn to send Push Notifications from your backend you can learn how to do that here - kzbin.info/www/bejne/p4m9hKSGfM6KipI
@maximilianomonsalbe2862
@maximilianomonsalbe2862 4 ай бұрын
can you help me? When I build aab or apk it does not get the token on my physical device, it shows the token not available sign. Should I add any permissions or additional settings that are not shown in the video? thank you!
@oliverrodriguez3238
@oliverrodriguez3238 26 күн бұрын
@@maximilianomonsalbe2862Hello, I have the same problem, did you find a solution?
@oliverrodriguez3238
@oliverrodriguez3238 26 күн бұрын
@@maximilianomonsalbe2862 Hello, I have the same problem, did you find a solution?
@javascripted_
@javascripted_ 6 ай бұрын
You are a g homie dude. Followed along, first test, it works, my app gets its first push notification. Simple as that. Pass the token to my api to store it with user data. Created a cron job that checks which notifications to send out to what users, now a bot can mass send relevant notifs. 1.5 hour project.
@maximilianomonsalbe2862
@maximilianomonsalbe2862 4 ай бұрын
can you help me? When I build aab or apk it does not get the token on my physical device, it shows the token not available sign. Should I add any permissions or additional settings that are not shown in the video? thank you!
@nickabramowicz
@nickabramowicz 6 ай бұрын
This helped me get through Android problems I was having. Works now thank you
@DanRNLab
@DanRNLab 6 ай бұрын
Happy to help!
@Brocollipy
@Brocollipy 3 ай бұрын
Thank you so much for this. It's one of those things that you set up.. it fails and is impossible to debug.. but thanks to you I've finally get it working!
@Zippo_1234
@Zippo_1234 6 ай бұрын
Thanks for putting out a new video Dan! This helped me implement push notifications in my app
@DanRNLab
@DanRNLab 6 ай бұрын
Happy to help!!! 😀
@collinsk8754
@collinsk8754 2 ай бұрын
A truly comprehensive tutorial! Thanks!
@hartye
@hartye 5 ай бұрын
Hey thanks for the video, you explained well the topic and it works perfectly, you're massively underrated for tye quality of your tutorials, keep it up man.
@DanRNLab
@DanRNLab 5 ай бұрын
Thanks for the kind words 🙂
@Haksemin
@Haksemin 6 ай бұрын
That's the thing what I was looking for, thanks!
@DanRNLab
@DanRNLab 6 ай бұрын
Happy to help!!! 😀
@KartikSharma-zz4hx
@KartikSharma-zz4hx 5 ай бұрын
How does it work when app is killed or in background state? I am passing a url in notification from server but it is just opening app and function is not getting triggered. Any workaround?
@Tyrone-Ward
@Tyrone-Ward 2 ай бұрын
Deep linking
@master_entertainment
@master_entertainment 6 ай бұрын
Thank you! I am learning about mobile development and your video helped a lot!
@DanRNLab
@DanRNLab 6 ай бұрын
Happy to help 🙂
@요스-m3l
@요스-m3l 4 ай бұрын
YOU ARE GOD You just saved our whole project Love you
@DanRNLab
@DanRNLab 4 ай бұрын
Happy to help 🙏
@ahmedfarrag2602
@ahmedfarrag2602 Ай бұрын
Amazing, I think just onething will be fantastic application for changeable data real time and show the data on bar in lock screen and bar when swap down and also can control it show/hide with react native 🔥🔥
@oaugustojunior
@oaugustojunior 6 ай бұрын
finally a tutorial that works. thumbs up
@DanRNLab
@DanRNLab 6 ай бұрын
Happy to help!!!
@ramimaalouf
@ramimaalouf 4 ай бұрын
Incredibly useful. Thank you so much man
@DanRNLab
@DanRNLab 4 ай бұрын
Happy to help!!! 😀
@x-vlog687
@x-vlog687 3 ай бұрын
Thanks a lot for explain with simple and perfect
@0001-exe
@0001-exe 4 ай бұрын
you're a lifesaver thank you so much for this!!
@DanRNLab
@DanRNLab 4 ай бұрын
Happy to Help!
@kerou4276
@kerou4276 2 ай бұрын
Thank you for this tot, can you show us how to send notification like in social media when someone following you or something like that and thank you again this was so helpful .
@DanRNLab
@DanRNLab 2 ай бұрын
This video talks about how to send push notifications from Backend Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@matheuscardoso6623
@matheuscardoso6623 2 ай бұрын
That's awesome! I've managed to make it work following your steps. But now I wonder: how to actually implement it via API? I mean, send contextualized notifications.
@DanRNLab
@DanRNLab 2 ай бұрын
If you mean sending them from a Backend this is my video on the subject. I hope this can help Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@AbhishekTR-tb7ze
@AbhishekTR-tb7ze 3 ай бұрын
Thank you very much bro! That was really helpful. Could you also share how to send a notification to all users of the app? Do I have to save all the tokens and send them individually?
@DanRNLab
@DanRNLab 3 ай бұрын
I usually associate a token with a user yes: kzbin.info/www/bejne/p4m9hKSGfM6KipI
@kineto7899
@kineto7899 5 ай бұрын
How to fix in a prebuild the expo push notification token return undefined?
@nithish8111
@nithish8111 Ай бұрын
did you got a solution ?
@nro337
@nro337 6 ай бұрын
great to see another video!!
@lubwamaemmanuel7743
@lubwamaemmanuel7743 4 ай бұрын
Beautiful.
@justiceiheanacho9631
@justiceiheanacho9631 3 ай бұрын
Thanks, this was helpful.
@niranjandabhade1477
@niranjandabhade1477 Ай бұрын
I get happy seeing your face
@night_city_nights
@night_city_nights Ай бұрын
Thanks for this!
@DanRNLab
@DanRNLab Ай бұрын
Happy to help!
@mateuswdo1588
@mateuswdo1588 Ай бұрын
Thanks Man
@wicakradityo1734
@wicakradityo1734 6 ай бұрын
thanks for the insightful video, Dan! Subscribed! I wonder how about handling the push notification, e.g. navigate to a particular screen when user taps the notification, etc ?
@DanRNLab
@DanRNLab 6 ай бұрын
Push notifications can be sent with a data payload. You can then use that data when the application opens to navigate to a screen
@mrmartin438
@mrmartin438 2 ай бұрын
Nice!!! I have a question. If i deploy app to google play or app store. This notifications with the ExponentPushToken still work?? I want to send to all divices than download my app.
@ahmedsubhani6774
@ahmedsubhani6774 10 күн бұрын
Hi, I need to send title and body message in both English and Arabic. I am sending the info using data field. is it possible to show notification according to the user app language preference?
@miguelorellana4052
@miguelorellana4052 10 күн бұрын
Thanks!!!!
@Prakashraz952
@Prakashraz952 12 күн бұрын
i use firebase and in server should be spratlky configure this?
@xhacker89x
@xhacker89x 6 ай бұрын
So this is the update that needs to be done after June 2024 that you talked about in the previous video: replace the FCM (legacy) server key with the FCM v1.. is it correct? I watched the video and it seems like the only thing that changes compared to the old video... the code has remained almost unchanged... or am I wrong? Thank you!
@DanRNLab
@DanRNLab 6 ай бұрын
Yes, you only need to upload the V1 token like I do in the Android part.
@WeiJianTan-fe4lh
@WeiJianTan-fe4lh 4 ай бұрын
Hi , first of all thanks for the tutorial appreciated it , but do we not need to add expo notification into app.json plugins? and also does it work on local build instead of eas build thank you
@raghums4975
@raghums4975 4 ай бұрын
Hi Dan, Video was amazing, but what if i want to integrate deep linking in our application, when app is in kill mode I'm not able to get payload data to navigate particular screen It would be very helpfull, if u make video on that Thank you
@DanRNLab
@DanRNLab 4 ай бұрын
Hey, happy I could help. I am not sure why the deep linking doesn’t work but I recommend for now checking out the Expo Discord. It is very active and they likely can help you there discord.com/invite/expo
@jaripolm5684
@jaripolm5684 5 ай бұрын
Hello Dan, Thank you for the very good video. I am developing a sports app and I would like to send push notifications (game start, goal) to users who are following teams that are currently in a live match. I have a firebase cloud functions which is streaming the match. I am working in Expo and I have been reading about firebase topic messaging, but apparently it does not work with Expo. Would you recommend rejecting expo or trying to handle it through a custom backend like cloud Firestore? Or maybe you have even a different idea. -Jari:)
@DanRNLab
@DanRNLab 5 ай бұрын
Hey, I am not really sure about what all the limitations are. I recommend asking in the expo discord discord.com/invite/expo
@samshon9285
@samshon9285 Ай бұрын
Hey Dan, what are we supposed to do if we already have a google-services file for google oauth? Do we merge the two files?
@oscarmaldonado6892
@oscarmaldonado6892 5 ай бұрын
Hey Dan, thanks for uploading this video, it has really helped me in my capstone project! I'm trying to run a build on iOS for notification testing purposes, but I can't get past when it asks for my apple creds. Is this something I can only get access to if I pay the $99/year for an apple developer account?
@DanRNLab
@DanRNLab 5 ай бұрын
Hey, happy to help. Yes you need the Apple account
@arturmrozinski7536
@arturmrozinski7536 3 ай бұрын
Guys but how do I actually send those notifications directly from the server? Great video, but everyone stops on the push tool, I want to know how to send them from server! I can't get the v1 push to work
@DanRNLab
@DanRNLab 3 ай бұрын
I have a video on sending from the server here: Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@arturmrozinski7536
@arturmrozinski7536 3 ай бұрын
@DanRNLab thank you so much for taking time to reply. Checking it out right away or burning my mac. One of the 2!
@alanblacker2686
@alanblacker2686 4 ай бұрын
i personally don't want to use firebase, i went with the method of ios and using js not tsx and i did get the notification, am i good to go? or do i HAVE to use firebase
@matheuscardoso6623
@matheuscardoso6623 2 ай бұрын
In 16:40, when you refresh the page you are already expecting for your project to appear. What action triggered that? Thank you.
@smk4930
@smk4930 4 ай бұрын
Thank you for your video I managed to compile your project. As a complete beginner I would like to know if it is possible to push notification with your projet on a pure emulator running on Google Play API? Thank you!
@kiluazoldyk
@kiluazoldyk 13 сағат бұрын
wow!
@princesiachin279
@princesiachin279 17 күн бұрын
how to generate the android and ios folders for expo?
@WG26Gaming
@WG26Gaming 3 ай бұрын
sir I am getting the same problem as you mentioned earlier that the firebase is not initialized and i litrally couldn't find any solution actually i was getting this before too but I thought you won't be getting this error by the way you are doing so i followed along but now i am still getting the error please share some details on how you fixerd this problem as i am encountring this problem from almsot a week still no work around and no solution.
@deelo55825
@deelo55825 2 ай бұрын
Quick question you are building using EAS build but also building locally using "npx expo run:ios --device". Do you need to do both?
@DanRNLab
@DanRNLab 2 ай бұрын
The -device just builds locally. You don’t need EAS for that
@dhananjay1704
@dhananjay1704 5 ай бұрын
How can we group notifications differently e.g. like whatsapp does to conversations?
@thomascarstens2729
@thomascarstens2729 26 күн бұрын
Not finding the FCM section under credentials - where did it go?
@Thomas-tf6wv
@Thomas-tf6wv 6 ай бұрын
Question: how would I go about linking the notifications to a certain condition, e.g. sending a fitness reminder if the user hasn't done their daily workout?
@DanRNLab
@DanRNLab 6 ай бұрын
You can schedule notifications locally if you like docs.expo.dev/versions/latest/sdk/notifications/#schedule-notifications
@geraldnelson007
@geraldnelson007 Ай бұрын
How to attach an image in FCM expo notification. It works messege body text but how to insert a image
@Malik_2024
@Malik_2024 2 ай бұрын
can you get notification while the app is on the foreground
@DanRNLab
@DanRNLab 2 ай бұрын
I think that should work
@andrewlevy2182
@andrewlevy2182 6 ай бұрын
Very helpful! Looks like the sample repo link is broken though.
@DanRNLab
@DanRNLab 6 ай бұрын
Thanks I’ll fix it now
@DanRNLab
@DanRNLab 6 ай бұрын
The repo is now public and the link should work. Thanks for the heads up!
@varandz
@varandz 6 ай бұрын
Thank you very much for this video, really helped me. If I put the Firebase file inside android directory, every time prebuild is called that would remove it, I think that's not ideal... Any solution for that?
@DanRNLab
@DanRNLab 6 ай бұрын
Maybe try putting it at the root directory and then pointing your app.json at that path?
@dustinbelliston
@dustinbelliston 4 ай бұрын
great video. how are you connecting the android device to your mac?
@DanRNLab
@DanRNLab 4 ай бұрын
Just through a standard USB-C nothing special
@user-kf3pz6ri7j
@user-kf3pz6ri7j 2 ай бұрын
I would like to know background notification if we send through FCM and Firebase it will appear on all devices background on the install app or relevant user device only ? How it works ? We need to do extra controls
@DanRNLab
@DanRNLab 2 ай бұрын
This video may answer your questions Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@lifeioUK
@lifeioUK 6 ай бұрын
How To Add Custom Notificaion sound in expo notifications?
@neeraj_m
@neeraj_m 6 ай бұрын
hey Dan, awesome video! I implemented expo notification and background service for my application, but it only works on simulator, emulator and expo development build. It doesn't work on android apk. Can you help me understand what could be wrong here?
@DanRNLab
@DanRNLab 6 ай бұрын
I haven’t seen this problem in my environment. It’s best to double check this with the expo team in their discord discord.com/invite/expo
@not_urda
@not_urda 6 ай бұрын
I'm facing the same issue, the token shows as undefined. Would you mind sharing your solution?
@nik.tomazic
@nik.tomazic 6 ай бұрын
Hey Dan, thank you for the great video. I'm wondering how I'd send a notification to all the users? Do I have to collect and store all users' Expo push tokens and then use Expo REST API or is there a better way?
@DanRNLab
@DanRNLab 6 ай бұрын
I have a video about it here Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@nik.tomazic
@nik.tomazic 6 ай бұрын
@@DanRNLab Oh thanks. It follows a similar approach as I described.
@tzur8shubi
@tzur8shubi Ай бұрын
will this also work for expo managed workflow?
@DanRNLab
@DanRNLab Ай бұрын
Unfortunately no, you need a development build
@shakatalka9864
@shakatalka9864 6 ай бұрын
My application is handling push notifications fine in the development build but on TestFlight it is not getting the expo push token… any ideas why that is? Problem started happening when upgrading from expo 47-50. Would appreciate the help:)
@DanRNLab
@DanRNLab 6 ай бұрын
On my end this works in release mode, you may want to try and look into the Expo Discord Server for more help - discord.com/invite/expo
@ДамирБайденов-н8в
@ДамирБайденов-н8в 8 күн бұрын
how to send a notification to the application from the backend (python example)? please help ╥﹏╥
@DanRNLab
@DanRNLab 8 күн бұрын
Hey I have a video here Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@hack89-ps1cg
@hack89-ps1cg 6 ай бұрын
I update my project but when I press a button in my app that should send notifications to users, it is only sent to some of them. I don't understand why. Every time a user logs in, the token is taken via custom hook and saved in the DB in that user's collection. When in the app, I press a specific button I send the notification via POST request as explain in the expo documentation. Under "to" I pass the array with the tokens of the various users registered in the app. Is this logic correct? Thanks
@DanRNLab
@DanRNLab 6 ай бұрын
At this point I am unsure, I recommend asking in the Expo Discord discord.com/invite/expo
@sreenivasreddykick4503
@sreenivasreddykick4503 6 ай бұрын
can u make a video on push notification with firebase it’s urgent ‼
@DanRNLab
@DanRNLab 6 ай бұрын
Unfortunately, I only had time to do this one at the moment.
@CaioSamarone-u5m
@CaioSamarone-u5m 6 ай бұрын
Great video! What If I had a backend .NET server and SqlServer for DB. I want to trigger a push notification from my backend server to specific users, is it possible? I have to store the expo token in db so backend could do it? Thanks!
@DanRNLab
@DanRNLab 6 ай бұрын
This is how I did it in NodeJS. Maybe you can adapt it? It is along those lines though Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@randyb9544
@randyb9544 5 ай бұрын
Hello @DanRNLab. I currently am running a development build for android. Whenever I click on my notification that I receive, it seems to rebuild the application. Is this normal behavior? If I have the app closed, but in the background, it also seems to rebuild. My goal is to be able to route using notification data, however, after following the documentation, it doesn't seem to route either.
@DanRNLab
@DanRNLab 5 ай бұрын
The bundling part after reopening is normal. It doesn’t happen in release mode. The routing stuff sounds off tho. I recommend taking this to the Expo discord discord.com/invite/expo
@bero8062
@bero8062 6 ай бұрын
I followed the tutorial and everything works fine on ios and in android expo go but on android development build and in actual apk after notification arrives and i open app it cant recieve data.when app is killed addNotificationResponseReceivedListener is not getting triggered.I saw several github issues with same problem and some workarounds but on expo 50 nothing really worked. is it expo problem and is there any workaround or fix for it? thanks for the video.
@DanRNLab
@DanRNLab 6 ай бұрын
I see, if you are still having issues I recommend the Expo Discord. I am in there too sometimes, you can get a lot of good help here: discord.com/invite/expo
@bero8062
@bero8062 6 ай бұрын
Thanks for the reply. I will ask for help there.
@bayramcinarr
@bayramcinarr 2 ай бұрын
it is not working in my APK app. İs it just working in Expo go ?
@DanRNLab
@DanRNLab 2 ай бұрын
I have information about this in the pinned comment.
@bayramcinarr
@bayramcinarr 2 ай бұрын
@@DanRNLab I dont have discord account do you know the solution ?
@DanRNLab
@DanRNLab 2 ай бұрын
@bayramcinarr unfortunately, if the video steps didn’t work for you I am not sure why you are having problems. Discord is the best backup resource for those who are having trouble.
@dilanthawijesinghe
@dilanthawijesinghe 5 ай бұрын
No matter what i do, i keep getting the "Firebase not initialized" error 😔
@rookieDev-qw5xw
@rookieDev-qw5xw 4 ай бұрын
same here i keep getting "Firebase not initialized". Did u get it working?? If so what mistake did u make ??
@SebastiendBs
@SebastiendBs 6 ай бұрын
How can I send notifications through firebase?
@DanRNLab
@DanRNLab 6 ай бұрын
Do you mean sending notifications to several different users? For that you would need a backend. I explain here Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@manfyegoh
@manfyegoh 6 ай бұрын
i dont have android folder, do i need to prebuild it?
@DanRNLab
@DanRNLab 6 ай бұрын
When you do prebuild it generates it for you
@LinhNguyen-nh8oq
@LinhNguyen-nh8oq 2 ай бұрын
Hi Dan, I have a question. Could we build but dont use EAS, like run locally, I try to run npx expo run:ios and npx expo run:android but when I enter the app, it show me the alert that "Must be using a physical device for Push notifications", which means it is not a physical device.
@LinhNguyen-nh8oq
@LinhNguyen-nh8oq 2 ай бұрын
also I dont have a Apple paid developer account, maybe consider switching to Android
@DanRNLab
@DanRNLab 2 ай бұрын
I think you can build locally, however you still need two things: 1) You need to set up your credentials with EAS 2) You must use a physical Android or iPhone. Simulators will not work at all.
@DanRNLab
@DanRNLab 2 ай бұрын
This will not work on iOS without a paid developer account. You’ll need to switch to Android
@LinhNguyen-nh8oq
@LinhNguyen-nh8oq 2 ай бұрын
Oh ok, I guess I have to plug my actual physical device using USB to my Mac
@BukkyOdunsi
@BukkyOdunsi 5 ай бұрын
Must it be in typescript?
@DanRNLab
@DanRNLab 5 ай бұрын
If you remove the type annotations it should work in JS as well
@Alanoudii11
@Alanoudii11 5 ай бұрын
Do i have to have the paid developer id from apple?
@DanRNLab
@DanRNLab 5 ай бұрын
To set up push notifications yes you do
@Alanoudii11
@Alanoudii11 5 ай бұрын
@@DanRNLab great thanks, and the key for android (firebase generated key from the services) if we work in group do each of them need to generate a key? Or if they are logged into the acc it becomes there?
@ankushsarkar1746
@ankushsarkar1746 Ай бұрын
i love you
@Andrei-pq6qp
@Andrei-pq6qp 5 ай бұрын
Would this work on expo go?
@DanRNLab
@DanRNLab 5 ай бұрын
No, you need to prebuild
@Andrei-pq6qp
@Andrei-pq6qp 5 ай бұрын
@@DanRNLab Thanks for replying! I walked through your steps, which include prebuild, and it did work for expo go too, on android at least. Do you have any suggestions if and how can I test it on iOS as well?
@DanRNLab
@DanRNLab 5 ай бұрын
Np! I don’t have any extra suggestions beyond what is in the video
@Nucletic
@Nucletic 3 ай бұрын
Hey you Stole my Outro, Happy Hacking! 😊 just kidding
@DanRNLab
@DanRNLab 3 ай бұрын
I think we all stole it from @wcandillon at the end of the day haha.
@santd3400
@santd3400 3 ай бұрын
No Paid Apple Account = No Hope
@marcesalas7115
@marcesalas7115 19 күн бұрын
You are my fcking hero mate
@DanRNLab
@DanRNLab 19 күн бұрын
Happy to help!!!
@leiwenchao
@leiwenchao 4 ай бұрын
Hello, my steps are the same as yours, but my result is:"Fetching the token failed: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE"; Is it due to the network?----I am in China。
@DanRNLab
@DanRNLab 4 ай бұрын
Unfortunately, many Firebase features are not available in China.
@mgmg612
@mgmg612 4 ай бұрын
you're a lifesaver..!!!🥹 thank you so much for this video.
@DanRNLab
@DanRNLab 4 ай бұрын
Happy to help!!! 🙏
Expo Go vs Development Builds: Which should you use?
21:37
Expo Notifications with EAS | Complete Guide
51:50
Code with Beto
Рет қаралды 2,4 М.
10 Expo Router Tips You Need to Know
18:07
Simon Grimm
Рет қаралды 13 М.
Making a Desktop App with a Game Library
28:57
Coding with Sphere
Рет қаралды 6 М.
10 Best Push Notification Services and Tools in 2024
5:49
MobiLoud - Turn Your Website Into a Mobile App
Рет қаралды 14 М.
Myths About Angular in 2024
11:19
Decoded Frontend
Рет қаралды 7 М.
How To Send Push Notifications With JavaScript
11:38
Web Dev Simplified
Рет қаралды 345 М.
React Native vs Flutter - Which should you use?
22:31
Simon Grimm
Рет қаралды 35 М.
FlutterFlow 5.0 Is MUCH MORE Powerful Than I Expected!
34:33
James NoCode
Рет қаралды 7 М.
How to build a QR Code Scanner with Expo ( React Native )
13:28
Dan's React Native Lab
Рет қаралды 4,4 М.
React Native Security: Lock Screen, Face ID & Privacy Overlay
32:54