Ejabberd mod_push - firebase-cloud-messaging

I am new to ejabberd and wanted to accomplish a functionality of push notifications.
According to documentation it says ejabberd only handles the server part.
I will use FCM to deliver push notifications to android and I am already using a nodejs app server which is connected to mysql.
Expectation: I want to push that offline message to the nodejs app server where I can manage get token info which I will save into mysql and will trigger FCM from there.
Just like in following url : url_to_nodejs_signaling_server
I went through many articles but there are outdated ones.Some says to create offline_hooks but I dont find any good article for it. I want to use my nodejs server to handles the trigger for FCM.
https://github.com/processone/ejabberd/blob/master/src/mod_push.erl

Related

Configure expo notifications for push notifications

I have 2 apps and I implemented expo push notification and everything was fine, but in the other one it asked me for the experienceid as a prop to Notifications.getExpoPushTokenAsync({
experienceId: "#name/slug,
});
and when trying to send a notification it gives me this error: InvalidCredentials: Unable to retrieve the FCM server key for the recipient's app. Make sure you have provided a server key as directed by the Expo FCM documentation.
I dont want to use FCM, i want to use expo push api.
Can you help me?
The Expo Push API uses FCM for Android, and while it's not necessary to configure it for Expo Go (this is done already for the Expo Go app), when you deploy your standalone app you will need to have it configured for FCM. More information here: https://docs.expo.dev/push-notifications/using-fcm/

Push API / Web Push: what is the behaviour if client is offline?

I just finished the Google codelabs about Push notifications and I have some questions that I couldn't find any answer yet.
Using only web-push library on the server (so no Firebase or anything), do we need to create a database in order to store the endpoint and the userId ?
What happens if the client is offline when the server sends a Push notification ? Does the client will get it as soon as he's online ? Is the notification lost ?
-> if the notification is lost would it be a good solution to create a database table containing each notification and the status (delivered, not delivered) for example ?
I even searched in the on the Push API documentation and on the web-push npm page but there aren't any informations about those points.

How to Send Push Notification to Xamarin Android app?

I need to implement push notification to our Android App using Xamarin. Here is the process. We have web version which used by the Manager. The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app uses same database then we created an api(REST API in MVC C#) to connect and get data from the db to be used in the mobile app.
Can someone recommend to me which Push notification plugin(a plugin or nuget) should I use to do this? Currently, I have set up Push Notifications through App center & Firebase but not sure how this work.
Thank you.
I need to implement push notification to our Android App using Xamarin.
I would suggest you use Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging also known as FCM. See to it that you are well versed on how it works before you start coding anything read the documents it answers most of your questions there itself.
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
For this, you will have to check on how to work with Firebase using Rest-API. Once you configure the Rest-API and then apply your business logic to it things will be quite easier than you might have imagined.
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
My recommendation is quite simple, Do not use any sort of a firebase push notifications plugin!. I have had a very bad past with plugins and ever since then I never recommend fellow developers to use plugins until it is a well-maintained one. I would rather ask you to simply configure Firebase on the basis of the guides that are available online. Like the following Xamarin.Android guide for FCM. It is detailed contains everything that you are looking for and what else I would suggest is you check firebase related answers on SO and you will find that almost everything that is not available in docs is covered around here and in detail. Like the following:
How to handle Firebase Notification i.e. Notification Messages and Data Messages
Push Notification in android with firebase get token
How to send device to device messages using Firebase Cloud Messaging?
Receive push notifications on one android app from two Firebase projects

PushSharp - GCM Authorization Failed

Using v4.0.10 of Pushsharp (nuget package), I am getting error GCM Authorization Failed when sending push notifications to Android devices.
Seems the bug raised in issue 574 (https://github.com/Redth/PushSharp/issues/574 ) has been compiled into the nuget package, yet I'm still getting this error.
Could this be related to the introduction of Firebase Cloud Messaging?
Does anyone still have success using GCM?
As of right now, GCM is still usable. However, it is highly encouraged for new users to use FCM instead. Either way, for both GCM and FCM, you must use a Server Key generated from the Firebase Console. There is a visible note in the GCM docs saying:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
The Authorization error has been encountered by number of users, some also had an old project. See my answer here for more details.
The sender id used in the app code needs to match the sender id Firebase Cloud Message Console and its corresponding "Firebase Cloud Messaging token".
Thank you #AL for your help.

Parse Server and Stripe Events

I am hosting my parse server on Heroku. Before migrating my parse.com account, I used the webhooks feature of parse to process billing events from Stripe using the URL http:KEY#api.parse.com/1/functions/stripEvents in strip's webhooks.
I have installed the node Stripe module as per the instructions of the migration steps.
My understanding is that api calls are no longer supported in the parse server platform. How would I route/send posts sent from Stripe to a function inside the new parse server platform?
Thanks
I stand corrected, it does work.
www.your_app_name.herokuapp.com/path/functions/yourFunctionName is the URL to access a cloud function. You do however need to add the needed security keys. In the case of stripe you past this URL:
https://MASTER_KEY:javascript-key=JAVASCRIPT_KEY#your_app_name.herokuapp.com/v1/functions/FUNCTION_NAME
note that I mount my parse app on path V1.