The Push Notifications Guide for Ionic & Capacitor

  Рет қаралды 100,025

Simon Grimm

Simon Grimm

Күн бұрын

Пікірлер: 265
@yuriileso773
@yuriileso773 3 жыл бұрын
Hi Simon! Great video! I spend a couple of hours to understand all process and then found your tutorial. Thank you for clear explaining and showing all details there You save me many time!
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Great to hear Yurii, always happy to help :)
@divineperspicaciousness
@divineperspicaciousness 2 жыл бұрын
Thanks Simon, these tutorials and Angular tutorials with Ionic in particular are really helpful considering just how many things can go wrong when you're battling through the code alone! Glad to see things are slowly getting easier with the Ionic workflow
@galaxies_dev
@galaxies_dev 2 жыл бұрын
You're very welcome!
@vipinmishramd
@vipinmishramd 9 ай бұрын
Thank you Simon for this tutorial. this video is too understanding for beginner. Thank you 😊😊
@galaxies_dev
@galaxies_dev 9 ай бұрын
Glad to hear that!
@AlexisDessard
@AlexisDessard 2 жыл бұрын
Huge thanks for your tutorial, iOS part is not intuitive at all but you made it as simple as it could be. 👍
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Glad it helped!
@id-aiHa-Ezio
@id-aiHa-Ezio 4 жыл бұрын
Hey Simon, great video. 🚀👍🏻👏🏻 I love Ionic
@yunotazombie
@yunotazombie 4 жыл бұрын
Great video, I don't know why I can see the notifications with the app closed but if the app its open I don't receive anything neither I see them on the log
@devzona
@devzona 4 жыл бұрын
// Show us the notification payload if the app is open on our device PushNotifications.addListener('pushNotificationReceived', (notification: PushNotification) => { // alert('Push received: ' + JSON.stringify(notification)); console.log('Push received: ', notification); let alertRet = Modals.alert({ title: notification.title, message: notification.body }); } );
@IshchenkoVitaliy
@IshchenkoVitaliy 2 жыл бұрын
Thank you for great guide! Also thanks for the hint with the router.
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Glad I could help!
@simonazzopardi3762
@simonazzopardi3762 4 жыл бұрын
Thanks for the video. It is very helpful. In my case, the app is crashing when I receive something and when the app in background, nothing happens. Do you have any clue?
@emreaka3965
@emreaka3965 Жыл бұрын
Thank you, Simon. You help a lot!
@galaxies_dev
@galaxies_dev Жыл бұрын
Glad to hear that Emre!
@stasoline
@stasoline Жыл бұрын
Great video, thanks for sharing!
@galaxies_dev
@galaxies_dev Жыл бұрын
You are welcome!
@GujaratiSafar
@GujaratiSafar 2 жыл бұрын
all videos is a good, thanks sir.
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Glad you like them!
@andresflg
@andresflg 4 жыл бұрын
Thank you very much, from Colombia! :D
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Glad it helped!
@davidsosa5940
@davidsosa5940 4 ай бұрын
Hi Simon, help with showing the notification when the app is on the foreground ? Thanks
@DevarshiDavessj4
@DevarshiDavessj4 8 ай бұрын
Hi Simon, can you please create a video on Notification badge on App icon? facing a lot of issues there...
@JitenderRaghav
@JitenderRaghav 3 жыл бұрын
Hello Simon, getting this : Module '"@capacitor/core"' has no exported member 'PushNotification' could you suggest about it ?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes, since Capacitor all the plugins are in their own package, so now it's "npm install @capacitor/push-notifications"
@pauldean9146
@pauldean9146 3 жыл бұрын
Hi Simon thanks for the Tutorial. I've had a few issues with this on Cap 3 I've changed all the imports to fall in line with the updated Capacitor spec, i get a token, but never receive messages on iOS, all the apple certs seem fine ( tried using p12s and just the key file, and both at same time ) no matter what i try, nothing comes in
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Did this work for you before Cap 3?
@pauldean9146
@pauldean9146 3 жыл бұрын
@@galaxies_dev honestly, this is the first time using Firebase, I was using OneSignal until i started a new project where Firebase looked like a shiny new route to take rather than OneSignal from an implementation perspective it seems much simpler then OneSignal, so I never actually got to try on Pre-Cap-3 projects. BUT - having had a fiddle with it, it seems that I had two Firebase projects running and I was trying to deploy notifications from the wrong platform... coz I'm basically an idiot with a tight deadline.. - Thanks for the videos Simon, your content really helps me.
@sarthakbhatt4709
@sarthakbhatt4709 2 жыл бұрын
@@galaxies_dev Yeah same for me. I tried all the step that were shown in the video and updated the delegate file from the new capacitor v3 document. Not receiving the notification at all.
@sarthakbhatt4709
@sarthakbhatt4709 2 жыл бұрын
Did you find any solution for the mentioned problem ?
@microvirus
@microvirus 4 жыл бұрын
what about that notification icon? it was white dot on android. how to fix that sir?
@wakikuk
@wakikuk 2 жыл бұрын
Hi Simon, I tried to follow up step by step, but when build on android i founded error : C:\xampp\htdocs\SIPADU ode_modules\@capacitor\push-notifications\android\src\main\java\com\capacitorjs\plugins\pushnotifications\MessagingService.java:9: error: cannot access Service public class MessagingService extends FirebaseMessagingService { ^ class file for android.app.Service not found Please what wrong with my code
@sviluppoprogettoautomazion2746
@sviluppoprogettoautomazion2746 4 жыл бұрын
Hi Simon, can I do the same thing with cordova instead?
@ferranmuntada2454
@ferranmuntada2454 10 ай бұрын
Hi Simon! Can u make a video implementing push notifications with action buttons? I didn't see any information about it ! Thank you!
@Kamleshyadav-yk7kr
@Kamleshyadav-yk7kr 2 ай бұрын
Thanks a lot, it is working like charm😊
@zauberschurke4012
@zauberschurke4012 2 жыл бұрын
Amazing Guide!! thank you sooo much
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Glad you enjoyed!
@eddielim7274
@eddielim7274 4 жыл бұрын
Thanks Simon for this video. How can I show a badge in app icon when the app is close not running in background and foreground for android? I have added ["badge", "sound", "alert"] in the capacitor config but it doesn't work. Thanks for your help.
@gausmohammadshaikh8739
@gausmohammadshaikh8739 4 жыл бұрын
Hello hi sir, we can send push notification using REST API to specific user mobile by using ionic cordova and firebase.plz I request to given me some solutions regarding this. thank you.
@eliabekun
@eliabekun 4 жыл бұрын
Fantastic tutorial man! Can you make some video about send notifications by ionic?
@ciprian-danielturca3067
@ciprian-danielturca3067 3 жыл бұрын
Hi, and thank you for the tutorial! Sometimes the "pushNotificationActionPerformed" listener is not triggered. When the app is closed, after we get a notification, the app is open and the listener is working fine. When the application is in the background and we open a notification, the listener is not triggered. In most cases it works even when the application is in the background. But sometimes it's not triggered, and we don't know what can be the problem . Do you have any idea or suggestion why sometimes the listener it’s not triggered? Any help would be great. The problem occured when app rest in background for longer time (a day for example). Thank you!
@kennedystephen
@kennedystephen 4 ай бұрын
@Simon - if we make changes directly to platform files (under ios and android), wouldn't that mean we'd have to keep those folders under source control as well?
@GreenWebSevilla
@GreenWebSevilla 10 ай бұрын
Great and easy tutorial! How can we get the token on Android to test the push notifications?
@ryanholton961
@ryanholton961 4 жыл бұрын
Great tutorial! A few questions... 1. I want to send out custom notifications based on a schedule that a user can select from within an app 2. How could I get a notification to trigger automatically based on an API? For instance, I want to send a notification to an individual Firebase account based on the data that user has requested to see notifications for? 3. Are persistent notifications possible? What happens if a user’s phone restarts or their app updates
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You need to handle the logic on your backend for scheduling. So you would have to schedule some kind of job to send out the push in the future, depending on your choice of backend (a cron job, or scheduled inside Firebase cloud functions - many possibilities) What you mean by persistent? Whenever you receive a push you can store the data if you need to access it later, otherwise the information is gone anyway, and a restart or update isn't all that different then!
@kayodeolaniyi3566
@kayodeolaniyi3566 4 жыл бұрын
Thank you for this, I was able to get it running on android, hope to test IOS soon. God willing
@Ashutoshsingh-s1p
@Ashutoshsingh-s1p Жыл бұрын
can make new push notification using capacitor using android
@paulrackwitz4553
@paulrackwitz4553 Жыл бұрын
Hi Simon, thank you for the tutorial! If have an issue with the router push to the detail page: when the app is closed in the background and gets opened with a push by id, the router push is not working and only the app (startpage) opens.
@galaxies_dev
@galaxies_dev Жыл бұрын
Sounds strange, but maybe Angular is not yet ready to run the router? Or is there any log in the console?
@paulrackwitz4553
@paulrackwitz4553 Жыл бұрын
@@galaxies_dev actually i cannot test push notifications when the app is build over the simulator or a plugged in device, so i have no console information to debug. I think the problem is, that the app first needs to start and then sets the listeners for the pushNotificationActionPerformed afterwards which is too late to perform the router push..
@darshanbhut6714
@darshanbhut6714 4 жыл бұрын
What about the push notifications receive event i have try too much to get receive notification from firabase as above implementation but it work properly when app is closed or in background stage but not working on foreground/open or visible stage so any idea about how to resolve it..thanks..
@galaxies_dev
@galaxies_dev 4 жыл бұрын
During my tests I definitely got an event for both, open or closed app! Put a log everywhere and try again, this should definitely be possible!
@devzona
@devzona 4 жыл бұрын
// Show us the notification payload if the app is open on our device PushNotifications.addListener('pushNotificationReceived', (notification: PushNotification) => { // alert('Push received: ' + JSON.stringify(notification)); console.log('Push received: ', notification); let alertRet = Modals.alert({ title: notification.title, message: notification.body }); } );
@grandvilletanbunan6435
@grandvilletanbunan6435 9 ай бұрын
Hi Simon, thank you for the tutorial. Now I can Push Notification from FCM, but is there any possible way to trigger Push Notification right after we insert Document to a Collection in Firestore Database?
@xianchen1935
@xianchen1935 3 жыл бұрын
Hello, the @capacitor/core Plugin is deprecated, are there any alternatives to connect with Firebase cloud messaging with capacitor?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes, you simply need to install those packages on their own and not import them from the Capacitor core!
@tikini
@tikini 9 ай бұрын
Thank you for the video But i have a problem, I use Ionic 7 and Capacitor 5 and after many tests, I found that the PushNotifications.addListener('registration'... function doesn't fired. Can you help me, please?
@kennedystephen
@kennedystephen 4 ай бұрын
If we make changes directly to platform files (under ios and android), wouldn't that mean we'd have to keep those folders under source control as well?
@jean13666
@jean13666 3 жыл бұрын
Thanks for the video. What can be done do unregister (in order to stop receiving notifications?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I think you should just unregister the listeners: capacitorjs.com/docs/apis/push-notifications#removealllisteners
@jean13666
@jean13666 3 жыл бұрын
@@galaxies_dev Thanks. I will check it out.
@dlodeprojuicer
@dlodeprojuicer 4 жыл бұрын
Thanks!!! By far the most clear Push Notifications tutorial.... 1) Any idea when generate command in ionic/cli will be available for Ionic Vue? 2) Where can one find an Ionic Vue tutorial for the services steps?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
1) no sorry, not involved in the Vue development (but a first RC is out!) 2) Also no idea :D
@solarmatica
@solarmatica 2 жыл бұрын
Thank you Simon. You are the best. ActionPerformed event doesn't fire if the app was killed, so when user tap on notification iOS just open my app and I unable to retrieve additional payload data (detailId) for open proper detail page. How can I mange this issue?
@davidruiz6689
@davidruiz6689 2 жыл бұрын
I have the same issue. I checked the Capacitor docs and says "This plugin does support data-only notifications, but will NOT call pushNotificationReceived if the app has been killed. To handle this scenario, you will need to create a service that extends FirebaseMessagingService, see Handling FCM Messages." and that redirect to Firebase docs and explains to create a service but it is in Java or Kotlin, but nothing about Ionic/Angular, so it's really confusing and I don't know what to do to resolve the issue
@biswajitkar237
@biswajitkar237 3 жыл бұрын
Hi Simon, Great tutorial. But we have a small issue. Whenever the app is open or it's showing in recent apps, the notifications are coming successfully. But when the user closes the app means it's not in the recent apps, he is not receiving the notifications. What are we missing here. Can you please help?
@yebadokpogodson7163
@yebadokpogodson7163 4 жыл бұрын
Thk you simon for your video , but it's not working for me .. I have this error : Default FirebaseApp is not initialized in this process com.aardra.cloud. Make sure to call FirebaseApp.initializeApp(Context) first. ! DO you have any idea
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Yes, did you put the initializeApp() like described in the video inside your app.module?
@monthewilfriedtutorials5423
@monthewilfriedtutorials5423 Жыл бұрын
Hi Simon. Great Tutorial but i'm battling since fews days now. I receive notifications when the app is closed, in background or in forground. Works great. But when the app is open and i tap on it the pushNotificationReceived event is not triggered as compared to when it is closed. How can i solve this issue please?
@sebasA
@sebasA 3 жыл бұрын
Hi Simon, Great video. How can I add a push notification generated from local app when this is on background?
@vldslv_plvk
@vldslv_plvk Жыл бұрын
Hi Simon! Thanks for the tutorial! Quick question: is it possible to use a custom sound for @capacitor/push-notifications?
@omarmcC2011
@omarmcC2011 Жыл бұрын
Do you have something for the latest onesignal plugin version? I mean the Beta 5.0.0. I just updated my project to that plugin version but mehotds seem to be quite different.
@OptimisticTechHub
@OptimisticTechHub 2 жыл бұрын
Great tutor. Enjoying of your videos. But having issue on attaching image to push on IOS. Any information on that?
@محمودجبالي-م7ز
@محمودجبالي-م7ز 8 ай бұрын
I'm Developing a restaurant app. how to create notification that contains "Your order is ready" when the order done by restaurant ? what is the correct API's to use??
@anroswell
@anroswell 4 жыл бұрын
Simmon i have one question, i can choose what user send the notification??
@sathithyayogi99
@sathithyayogi99 3 жыл бұрын
use FCM notification
@sicollins935
@sicollins935 3 жыл бұрын
Great tutorial Simon - helped me out a lot. Couple of burning questions I'm trying to find answers for: 1. If user turns off Push Notifications through the OS app settings is there an event we can listen for, so we can then revoke the push token on our backend system? 2. Is there an event we can listen for when a user clears the Notification without tapping on it when app is in background? i.e. so we can then clear badge count. 3. Can you point me in the right direction for getting Push analytics working through Firebase? Thanks
@galaxies_dev
@galaxies_dev 3 жыл бұрын
1) No not that I know of. But your backend will receive an error when sending the push I think, perhaps you can handle it from there. 2) Also never saw an event for that, but you could query them from within the app to see if they were removed: capacitorjs.com/docs/apis/push-notifications#getdeliverednotifications 3) Haven't used that before :/
@lucasmunaro1093
@lucasmunaro1093 9 ай бұрын
Hi Simon, your video helped me a lot to make the push work. But on iOS I'm having problems making sounds and displaying the badge. I did all the configuration as in the video, using presentationOptions but it still didn't work. I'm using quasar, vue3 and capacitor5, do you have any idea what it could be? On Android it worked perfectly!
@iamkalimorales
@iamkalimorales 3 жыл бұрын
thank you for the video!!
@galaxies_dev
@galaxies_dev 3 жыл бұрын
My pleasure!
@somchithnguyen7517
@somchithnguyen7517 4 жыл бұрын
thanks you for this useful tuto.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Glad it was helpful!
@allwyndsouza5633
@allwyndsouza5633 2 жыл бұрын
hey simon i followed your video step by step but i got an error node_modules/@capacitor/push-notifications/ios/Plugin/PushNotificationsHandler.swift:32:44: error build: Value of type 'CAPPlugin' has no member 'getConfig' i am using xcode 14 and ionic 6.20.1 and node 16.17.0 can you please help . Thanks
@AmitKamble-q2v
@AmitKamble-q2v Жыл бұрын
That was a great tutorial. But seems like `pushNotificationActionPerformed` no longer is triggered for android emulator. I can't get it to work and seems like people have had issues with this. I am using this with Angular 16 and Standalone components. Have tried debugging it in multiple ways, but can't seem to find a solution.
@Martin-kj1od
@Martin-kj1od 2 жыл бұрын
Great tutorial. I would like to ask what is the correct way to handle token refresh. The token gets outdated in time right ? Is is correct way to register for push notification every time user logs in and then compare the token with the one stored in database and update it if it differs ?
@galaxies_dev
@galaxies_dev 2 жыл бұрын
The device token should mostly be unique and won't get invalid, it's not like a JWT. Also, there is no way to "unregister" so you would have to manually remove the information from Firebase where you stored it. You can read more about the topic in this discussion: github.com/ionic-team/capacitor/issues/1777
@jared4670
@jared4670 2 жыл бұрын
Well nobody replied to my question a year ago and now I have encountered another issue after nearly two years of using Ioninc Push Notificaitons. The Token is now expired and there are no methods within the Ionic docs to perform a token refresh.
@y0urh0mew0rk
@y0urh0mew0rk 3 жыл бұрын
:) any way to do the action buttons? like in the local notification? using action performed listener to redirect depending on some state conditions but gotta use some explicitly labeled buttons, for user friendliness.
@mschannel829
@mschannel829 4 жыл бұрын
Hello Simon. Your videos are great. I followed the steps of your tutorial and I could receive Android messages, however in iOS 13 I dont receive any message. I think that my iOS configuration is right because the App obtains a token, and also, because when I set up Firebase I connected the App and I receved a notification (in firebase platform), saying that the connection with the device was successfull or the configutation was right. Do you know, whether there are Problems to integrate Push Notifications in iOS13? thank you!
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Perhaps there is an issue with the latest version as another comment also had problems on iOS :/
@mschannel829
@mschannel829 4 жыл бұрын
@@galaxies_dev hi Simon. I installed the last version of capacitor and I start to receive push notifications when the app is in background, but in foreground I do not receive any notification.
@Marshall86MT
@Marshall86MT 3 жыл бұрын
@@mschannel829 that's an old ios limitation as far as I remember even with cordova and FCM there was the same issue
@AlexisDessard
@AlexisDessard 9 ай бұрын
Thanks! (again, because I always watch this same video every 3 months for a different app)
@galaxies_dev
@galaxies_dev 8 ай бұрын
Thank you Alexis!!
@nbis23
@nbis23 4 жыл бұрын
Nice tutorial however when i close the app and then i received a notification when i tapped it does not redirect. But when i just hide the app the redirection works.
@anroswell
@anroswell 4 жыл бұрын
Ohh Simon thank you for this tutorial, it's great, i had a problem when i compile to Android Studio, capacitor create 2 package. any way thank...
@MrSteveHaran
@MrSteveHaran Ай бұрын
Hi Simon, I've been battling with push notifications within an installed PWA on ios complaining about the firebase SDK not being compatible. Is the capacitor a solution/requirement to get push notifications working on a PWA installed on ios?
@MrSteveHaran
@MrSteveHaran Ай бұрын
(note - not an app store app)
@AruljothySundramoorthy
@AruljothySundramoorthy 9 ай бұрын
It'll help more if you could added the code snippet :)
@josephnanakofiboakye2603
@josephnanakofiboakye2603 3 жыл бұрын
Hello. Can't seem to find it but from which minute is the android aspect? Can't tell
@wx8699
@wx8699 Жыл бұрын
TQ for your tutorial. i would like to know is it possible to open app when receive the notification from firebase? in android or ios TQVM
@galaxies_dev
@galaxies_dev Жыл бұрын
The user has to click on a message, you can't just force open an app!
@belovedambav7025
@belovedambav7025 4 жыл бұрын
Thanks so much Simon. Please I want to know how to include an external JS in my ionic 5 app. Tried multiple methods, but it's not working.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
I think you can just add the script to the index.html and then use the name of your function in your code!
@azzedinemassinissa9230
@azzedinemassinissa9230 4 жыл бұрын
Hello, thank you for this, how to push universal link ?
@rvuyyuru
@rvuyyuru 4 жыл бұрын
How to change notification icon for android ?
@prosperva
@prosperva 3 жыл бұрын
Great tutorial. But I am not getting the notifications on my device...
@tiagoschmittc
@tiagoschmittc 2 жыл бұрын
I am getting "remote notifications are not supported in the simulator". Do you know how to solve it? I am using XCode v13.3. Thanks!
@galaxies_dev
@galaxies_dev 2 жыл бұрын
I guess you simply can't test push notifications inside the simulator!
@ofcsmsofcsms8324
@ofcsmsofcsms8324 3 жыл бұрын
Awesome!!! But can you create a video that can send a push notification with the two devices
@galaxies_dev
@galaxies_dev 3 жыл бұрын
You should never send from one device to another as this requires a secret key, which you should keep on a server!
@harmanbhutani
@harmanbhutani 4 жыл бұрын
Amazing work Simon. I am able to get push notications following this tutorial but I observed that I only get notifications when app is running in background not when user is currently using app. Can you help me in solving this issue?
@devzona
@devzona 4 жыл бұрын
// Show us the notification payload if the app is open on our device PushNotifications.addListener('pushNotificationReceived', (notification: PushNotification) => { // alert('Push received: ' + JSON.stringify(notification)); console.log('Push received: ', notification); let alertRet = Modals.alert({ title: notification.title, message: notification.body }); } );
@devzona
@devzona 4 жыл бұрын
// Show us the notification payload if the app is open on our device PushNotifications.addListener('pushNotificationReceived', (notification: PushNotification) => { // alert('Push received: ' + JSON.stringify(notification)); console.log('Push received: ', notification); let alertRet = Modals.alert({ title: notification.title, message: notification.body }); } );
@pcpark7621
@pcpark7621 3 жыл бұрын
@Simon Grimm Thank you Simon I have one question for push notification. I "turn off" push notification of android Apps in android settings But when a return value is received, it's always true. can you tell me why? ================== const permissionResult = await PushNotifications.requestPermission(); return permissionResult.granted;
@berndeisermann3246
@berndeisermann3246 4 жыл бұрын
Hi Simon, very great video. What I have to do to see in firebase console if a user has opened a notification? Here I see always 0%.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Hmm I don't know about an easy way, but you should usually store the device token in the DB so then you know if someone accepted push!
@VirajGamage
@VirajGamage 3 жыл бұрын
Hi Simon, Thank u for the great tutorial. Can I pls know how to store the generated FCM in firebase in order to use it later to send push.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
You could simply write it to a collection for which you use the user unique ID as the document and then the FCM stored inside that document!
@argelpamintuango1956
@argelpamintuango1956 2 жыл бұрын
so you meant to say that in order to display push notification in android and ios, I have to download and install a file to my capacitor app? so whats the difference of switching cordova to capacitor if its still the same?
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Capacitor and Cordova have different philosophies, this can't be described just by the example of one plugin!
@manuelmariscal7286
@manuelmariscal7286 3 жыл бұрын
Hello Simon! One question please, i am struggling with this ionic native plugin cordova, it says i didnt install the the plugin but it is! How to solve this error?
@sandropecchia1297
@sandropecchia1297 3 жыл бұрын
Hi simon nice clear video (like all your other video). I work on a project with asp.core api + web angular + ionic mobile app. It is necessary to send notifications from the internal asp server to company smartphones. For security policies both the server and the mobile phones are in the local network and do not have access to the internet. Question1: is there a way to do this without using online services like firebase or azure etc? Question2: what can I use to send notifications from asp server to internal angular website? thank you very much .
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Thanks Sandro! 1) I'm actually not sure. For example iOS push basically goes through Apple servers before reaching your phone - guess that won't even be possible in your case :/ 2) You could use web push probably, but at least for iOS this won't work inside a PWA (only Android right now), but same like before not sure if that would even be possible..
@malteschafer5250
@malteschafer5250 3 жыл бұрын
Hey everybody, i've got it working like i want to but is it possible to request date like "sent/received/opened" from firebase? Help would me mush appreciated.
@m1kecrosoft
@m1kecrosoft 10 ай бұрын
how much money do you need to invest to get this working ?
@freddo1kenobi713
@freddo1kenobi713 4 жыл бұрын
What version for capactior push are you using here Simon? I have been trying to add my event listeners to my project and they only fire for android(ios does not fire onReceived or onAction) using ios core 2.4.1 package. They don't fire on either notifications received or opened, no matter what state the app is in(foreground, background, dead).
@joachimheirbrant1559
@joachimheirbrant1559 Жыл бұрын
how do i send a push notification to a user from the application itself. Like for exemple when a user buys a product and i want the seller to get a notification that his product has been sold?
@galaxies_dev
@galaxies_dev Жыл бұрын
As this usually requires secret keys, there should always be some sort of service or backend between that!
@HitNataf
@HitNataf Жыл бұрын
Hi , i'm using "@capacitor/push-notifications": "^4.1.2" for implement push notification in android app but facing issue like if app open that time i can't able to get any event on tap of that notification can you help me how i can retrieve click tapping event when app is open. Currently i'm using below eventlistner for notification. // Method called when tapping on a notification await PushNotifications.addListener('pushNotificationActionPerformed', async (notification: ActionPerformed) => { console.log('Push action performed- ', notification); } );
@BigStav
@BigStav 3 жыл бұрын
This is a good tutorial but since Capacitor 3 a lot of it doesn't work any more :( Will you consider redoing it for Capacitor 3?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Actually only the imports from the new PushNotifications packaged have changed, all the rest of the setup is still completely the same!
@thepowerofmusic01
@thepowerofmusic01 3 жыл бұрын
Hello Simon! Still not working on iOS? Can you help us to solve it please? Thank you! Regards
@mauricioklipe4669
@mauricioklipe4669 4 жыл бұрын
Have you had any experience using Capacitor with the Salesforce SDK? This SDK was written for Cordova, but it did not work properly syncing with cap.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
No haven't used that yet :/
@rogerobando4825
@rogerobando4825 3 жыл бұрын
Hi Simon, how are you? In Capacitor V3 not working this same, for me not working the package @capacitor/push-notifications :/. Did you work with that package?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Don't think I've tried it with v3 but not sure what should have changed :/
@mrsmola2354
@mrsmola2354 Жыл бұрын
Hello, i try to figure it out for Ionic Vue project, but with no success. Im stuck at 14:57 min, when you are creating services and page with that command, because in ionic vue it doesnt exist. Can you somehow help me how to continue? Thanks!
@galaxies_dev
@galaxies_dev Жыл бұрын
AFAIK there is no CLI generate command for Vue or React so you have to create those files manually following the Vue conventions!
@jamespeterson7824
@jamespeterson7824 3 жыл бұрын
@simon grimm, great tutorial. Just one security question, what if user has logged out and he gets a background notification and when he clicks on that GUARD WILL restrict him from entering the page and tell him to login..but now when user logs in ,how to redirect him to the path ( which we have set inside the notification click method )..how to achieve this?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Storing the state of navigation when using a guard is a bit more tricky, might do a tutorial on this - good idea!
@jamespeterson7824
@jamespeterson7824 3 жыл бұрын
@@galaxies_dev thanks for the reply..looking forward getting this scenario covered in your tutorial ...
@hamzaahmed2724
@hamzaahmed2724 3 жыл бұрын
on android device notification show in notifications tray but does not popup even in your tutorial it does not pop up how to fix this
@แบงค์-จ8ศ
@แบงค์-จ8ศ 3 жыл бұрын
error TS2305: Module '"@capacitor/core"' has no exported member 'PushNotificationToken'. all of 3 pushnotification is import from @core/cap failed :(
@galaxies_dev
@galaxies_dev 3 жыл бұрын
With Capacitor 3 you directly import the package, not from core anymore! See here: capacitorjs.com/docs/apis/push-notifications
@DevbyDech
@DevbyDech Жыл бұрын
Hi Simon! is it true that push notification for IOS do not need the developers program anymore?
@nikolaantonov5833
@nikolaantonov5833 2 жыл бұрын
Hello, @Simon Grimm! Could you please share with us if there is a way to make the push notifications work if the device is locked and the phone sleeps (the screen is black)?
@galaxies_dev
@galaxies_dev 2 жыл бұрын
That's exactly what push notifications are for - they arrive at the OS level so you should see them on the lock screen anyway!
@nikolaantonov5833
@nikolaantonov5833 2 жыл бұрын
@@galaxies_dev I agree but I followed the whole tutorial and they work perfectly only if the device is not locked. If I lock the device and the screen goes black, they popup only if I press the lock button to unlock the phone.
@anillip1
@anillip1 4 жыл бұрын
Thanks Simon, will AWS SNS will be advised which in-turn use Firebase ?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Haven't used AWS SNS so far, but you can create push notifications on many different ways!
@surajshetty817
@surajshetty817 4 жыл бұрын
Hey simon great video! I have one doubt, how to stop getting notifications from fcm when the user changed the settings to stop notification.
@galaxies_dev
@galaxies_dev 4 жыл бұрын
You can either toggle this in the device settings then or remove the FCM ID your previously stored for that user!
@jared4670
@jared4670 3 жыл бұрын
Save the FCM token along with is_notifications_enabled: boolean for example to your server-side database. That way when you loop through the array of users, you do a check first to see if their push notifications are enabled. If they aren't, then you skip that user.
@layankhater4446
@layankhater4446 2 жыл бұрын
Hi Simon. I'm getting this error message can you help me with it [Firebase/Messaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: remote notifications are not supported in the simulator
@Raffzahn12
@Raffzahn12 4 жыл бұрын
Great Video! How would you handle routing to a details page if you need to perform some logic upon starting the application (authentication for example)?
@galaxies_dev
@galaxies_dev 4 жыл бұрын
Good question. You could manually perform an authentication check in the push handling event and then route once the authentication is done. If this can't be done in the background and you need user input on login, perhaps store the push information inside a service (or local storage) and then check this value after every login to see if you have any "stored" events that you need to handle!
@iAbhinavSinghal
@iAbhinavSinghal 3 жыл бұрын
This is not working for capacitor v3. Please make a small video or blog post explaining the differences.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes I will take a look at that!
@manuelmariscal7286
@manuelmariscal7286 4 жыл бұрын
Also do you think doing a PWA can send notifications?
Ionic firebase push notifications for android
38:33
Coding Technyks
Рет қаралды 14 М.
How to Create Background Tasks in Ionic with Capacitor ⚡️
37:11
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 9 МЛН
How to add Google Sign In using Capacitor to your Ionic App
24:29
How to Build an Ionic 5 Calendar with Modal & Customisation
26:53
Angular Signals with Ionic: A Complete Step-by-Step Guide for 2024
1:23:24
Coding Technyks
Рет қаралды 1,3 М.
How to Create an Ionic PWA with Web Push Notifications
20:22
Simon Grimm
Рет қаралды 13 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 101 М.
Push Notifications in iOS Apps with Firebase Cloud Messaging
27:37
Rishab Kattimani
Рет қаралды 15 М.