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
@maximilianomonsalbe28624 ай бұрын
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!
@oliverrodriguez323826 күн бұрын
@@maximilianomonsalbe2862Hello, I have the same problem, did you find a solution?
@oliverrodriguez323826 күн бұрын
@@maximilianomonsalbe2862 Hello, I have the same problem, did you find a solution?
@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.
@maximilianomonsalbe28624 ай бұрын
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!
@nickabramowicz6 ай бұрын
This helped me get through Android problems I was having. Works now thank you
@DanRNLab6 ай бұрын
Happy to help!
@Brocollipy3 ай бұрын
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_12346 ай бұрын
Thanks for putting out a new video Dan! This helped me implement push notifications in my app
@DanRNLab6 ай бұрын
Happy to help!!! 😀
@collinsk87542 ай бұрын
A truly comprehensive tutorial! Thanks!
@hartye5 ай бұрын
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.
@DanRNLab5 ай бұрын
Thanks for the kind words 🙂
@Haksemin6 ай бұрын
That's the thing what I was looking for, thanks!
@DanRNLab6 ай бұрын
Happy to help!!! 😀
@KartikSharma-zz4hx5 ай бұрын
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-Ward2 ай бұрын
Deep linking
@master_entertainment6 ай бұрын
Thank you! I am learning about mobile development and your video helped a lot!
@DanRNLab6 ай бұрын
Happy to help 🙂
@요스-m3l4 ай бұрын
YOU ARE GOD You just saved our whole project Love you
@DanRNLab4 ай бұрын
Happy to help 🙏
@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 🔥🔥
@oaugustojunior6 ай бұрын
finally a tutorial that works. thumbs up
@DanRNLab6 ай бұрын
Happy to help!!!
@ramimaalouf4 ай бұрын
Incredibly useful. Thank you so much man
@DanRNLab4 ай бұрын
Happy to help!!! 😀
@x-vlog6873 ай бұрын
Thanks a lot for explain with simple and perfect
@0001-exe4 ай бұрын
you're a lifesaver thank you so much for this!!
@DanRNLab4 ай бұрын
Happy to Help!
@kerou42762 ай бұрын
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 .
@DanRNLab2 ай бұрын
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
@matheuscardoso66232 ай бұрын
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.
@DanRNLab2 ай бұрын
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-tb7ze3 ай бұрын
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?
@DanRNLab3 ай бұрын
I usually associate a token with a user yes: kzbin.info/www/bejne/p4m9hKSGfM6KipI
@kineto78995 ай бұрын
How to fix in a prebuild the expo push notification token return undefined?
@nithish8111Ай бұрын
did you got a solution ?
@nro3376 ай бұрын
great to see another video!!
@lubwamaemmanuel77434 ай бұрын
Beautiful.
@justiceiheanacho96313 ай бұрын
Thanks, this was helpful.
@niranjandabhade1477Ай бұрын
I get happy seeing your face
@night_city_nightsАй бұрын
Thanks for this!
@DanRNLabАй бұрын
Happy to help!
@mateuswdo1588Ай бұрын
Thanks Man
@wicakradityo17346 ай бұрын
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 ?
@DanRNLab6 ай бұрын
Push notifications can be sent with a data payload. You can then use that data when the application opens to navigate to a screen
@mrmartin4382 ай бұрын
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.
@ahmedsubhani677410 күн бұрын
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?
@miguelorellana405210 күн бұрын
Thanks!!!!
@Prakashraz95212 күн бұрын
i use firebase and in server should be spratlky configure this?
@xhacker89x6 ай бұрын
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!
@DanRNLab6 ай бұрын
Yes, you only need to upload the V1 token like I do in the Android part.
@WeiJianTan-fe4lh4 ай бұрын
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
@raghums49754 ай бұрын
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
@DanRNLab4 ай бұрын
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
@jaripolm56845 ай бұрын
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:)
@DanRNLab5 ай бұрын
Hey, I am not really sure about what all the limitations are. I recommend asking in the expo discord discord.com/invite/expo
@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?
@oscarmaldonado68925 ай бұрын
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?
@DanRNLab5 ай бұрын
Hey, happy to help. Yes you need the Apple account
@arturmrozinski75363 ай бұрын
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
@DanRNLab3 ай бұрын
I have a video on sending from the server here: Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@arturmrozinski75363 ай бұрын
@DanRNLab thank you so much for taking time to reply. Checking it out right away or burning my mac. One of the 2!
@alanblacker26864 ай бұрын
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
@matheuscardoso66232 ай бұрын
In 16:40, when you refresh the page you are already expecting for your project to appear. What action triggered that? Thank you.
@smk49304 ай бұрын
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!
@kiluazoldyk13 сағат бұрын
wow!
@princesiachin27917 күн бұрын
how to generate the android and ios folders for expo?
@WG26Gaming3 ай бұрын
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.
@deelo558252 ай бұрын
Quick question you are building using EAS build but also building locally using "npx expo run:ios --device". Do you need to do both?
@DanRNLab2 ай бұрын
The -device just builds locally. You don’t need EAS for that
@dhananjay17045 ай бұрын
How can we group notifications differently e.g. like whatsapp does to conversations?
@thomascarstens272926 күн бұрын
Not finding the FCM section under credentials - where did it go?
@Thomas-tf6wv6 ай бұрын
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?
@DanRNLab6 ай бұрын
You can schedule notifications locally if you like docs.expo.dev/versions/latest/sdk/notifications/#schedule-notifications
@geraldnelson007Ай бұрын
How to attach an image in FCM expo notification. It works messege body text but how to insert a image
@Malik_20242 ай бұрын
can you get notification while the app is on the foreground
@DanRNLab2 ай бұрын
I think that should work
@andrewlevy21826 ай бұрын
Very helpful! Looks like the sample repo link is broken though.
@DanRNLab6 ай бұрын
Thanks I’ll fix it now
@DanRNLab6 ай бұрын
The repo is now public and the link should work. Thanks for the heads up!
@varandz6 ай бұрын
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?
@DanRNLab6 ай бұрын
Maybe try putting it at the root directory and then pointing your app.json at that path?
@dustinbelliston4 ай бұрын
great video. how are you connecting the android device to your mac?
@DanRNLab4 ай бұрын
Just through a standard USB-C nothing special
@user-kf3pz6ri7j2 ай бұрын
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
@DanRNLab2 ай бұрын
This video may answer your questions Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@lifeioUK6 ай бұрын
How To Add Custom Notificaion sound in expo notifications?
@neeraj_m6 ай бұрын
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?
@DanRNLab6 ай бұрын
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_urda6 ай бұрын
I'm facing the same issue, the token shows as undefined. Would you mind sharing your solution?
@nik.tomazic6 ай бұрын
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?
@DanRNLab6 ай бұрын
I have a video about it here Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@nik.tomazic6 ай бұрын
@@DanRNLab Oh thanks. It follows a similar approach as I described.
@tzur8shubiАй бұрын
will this also work for expo managed workflow?
@DanRNLabАй бұрын
Unfortunately no, you need a development build
@shakatalka98646 ай бұрын
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:)
@DanRNLab6 ай бұрын
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 күн бұрын
how to send a notification to the application from the backend (python example)? please help ╥﹏╥
@DanRNLab8 күн бұрын
Hey I have a video here Learn to Send Expo Push Notifications From A Server kzbin.info/www/bejne/p4m9hKSGfM6KipI
@hack89-ps1cg6 ай бұрын
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
@DanRNLab6 ай бұрын
At this point I am unsure, I recommend asking in the Expo Discord discord.com/invite/expo
@sreenivasreddykick45036 ай бұрын
can u make a video on push notification with firebase it’s urgent ‼
@DanRNLab6 ай бұрын
Unfortunately, I only had time to do this one at the moment.
@CaioSamarone-u5m6 ай бұрын
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!
@DanRNLab6 ай бұрын
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
@randyb95445 ай бұрын
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.
@DanRNLab5 ай бұрын
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
@bero80626 ай бұрын
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.
@DanRNLab6 ай бұрын
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
@bero80626 ай бұрын
Thanks for the reply. I will ask for help there.
@bayramcinarr2 ай бұрын
it is not working in my APK app. İs it just working in Expo go ?
@DanRNLab2 ай бұрын
I have information about this in the pinned comment.
@bayramcinarr2 ай бұрын
@@DanRNLab I dont have discord account do you know the solution ?
@DanRNLab2 ай бұрын
@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.
@dilanthawijesinghe5 ай бұрын
No matter what i do, i keep getting the "Firebase not initialized" error 😔
@rookieDev-qw5xw4 ай бұрын
same here i keep getting "Firebase not initialized". Did u get it working?? If so what mistake did u make ??
@SebastiendBs6 ай бұрын
How can I send notifications through firebase?
@DanRNLab6 ай бұрын
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
@manfyegoh6 ай бұрын
i dont have android folder, do i need to prebuild it?
@DanRNLab6 ай бұрын
When you do prebuild it generates it for you
@LinhNguyen-nh8oq2 ай бұрын
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-nh8oq2 ай бұрын
also I dont have a Apple paid developer account, maybe consider switching to Android
@DanRNLab2 ай бұрын
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.
@DanRNLab2 ай бұрын
This will not work on iOS without a paid developer account. You’ll need to switch to Android
@LinhNguyen-nh8oq2 ай бұрын
Oh ok, I guess I have to plug my actual physical device using USB to my Mac
@BukkyOdunsi5 ай бұрын
Must it be in typescript?
@DanRNLab5 ай бұрын
If you remove the type annotations it should work in JS as well
@Alanoudii115 ай бұрын
Do i have to have the paid developer id from apple?
@DanRNLab5 ай бұрын
To set up push notifications yes you do
@Alanoudii115 ай бұрын
@@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Ай бұрын
i love you
@Andrei-pq6qp5 ай бұрын
Would this work on expo go?
@DanRNLab5 ай бұрын
No, you need to prebuild
@Andrei-pq6qp5 ай бұрын
@@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?
@DanRNLab5 ай бұрын
Np! I don’t have any extra suggestions beyond what is in the video
@Nucletic3 ай бұрын
Hey you Stole my Outro, Happy Hacking! 😊 just kidding
@DanRNLab3 ай бұрын
I think we all stole it from @wcandillon at the end of the day haha.
@santd34003 ай бұрын
No Paid Apple Account = No Hope
@marcesalas711519 күн бұрын
You are my fcking hero mate
@DanRNLab19 күн бұрын
Happy to help!!!
@leiwenchao4 ай бұрын
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。
@DanRNLab4 ай бұрын
Unfortunately, many Firebase features are not available in China.
@mgmg6124 ай бұрын
you're a lifesaver..!!!🥹 thank you so much for this video.