I have developed a chat application for android using ejabberd as XMPP server. I want to send FCM push notification, when user is offline.
Can anyone help me or give an example for this ?
You can add apllication to connect to FCM to your ejabberd, and send notification each time message goes to offline storage with this library
I got your mail, I am answering here so it can help others. You should look into this erlang library that I wrote.
https://github.com/softwarejoint/fcm-erlang
The read me section has all the details.
So, your app registers its push token on server. Then when there is a particular event on server, server uses that token to send fcm a message. fcm in-turn sends the message to you.
Best
Pankaj
I faced the same task and finally solved it by writing my own Ejabberd module. I've stumbled over many problems since a lot has changed in later / the latest version(s) of Ejabberd.
Here's my Stackoverflow question where I just added my now working code for the module.
Maybe that help.
Related
I had a project from two application(flutter application) and three flutter-web on the same firebase i want to send notification from the web to the application.
i searched alot for this and i cant find any answer or solution for this case.
I had a project from two application(flutter application) and three flutter-web on the same firebase i want to send notification from the web to the application.
i searched alot for this and i cant find any answer or solution for this case.
I hope you understand that we can't give you the finish solution here. I would recommend to you to go trough this docs.
What we can do is to explain it a little bit. For your solution I would recommend to use FCM. And how they work is that:
you use the Firebase SDK to receive a token from the client device.
you store that token on one of the Firebase databases
when sending a push notification to a device you would need to do it from the Firebase Cloud Functions and use that token to send the message to it. When you do that the device from witch the token is will get the message.
It doesn't matter what platform the device is (web, ios or android). All of them can receive Push Messages (in Web most of them but nor 100% all).
From your use case I would not recommend to use topics. You want to send messages from device to device and therefore the tokens are the best solution for it.
I am working on push notification module at server side that will send push notification to mobile device.
As I am backend developer only, I need some online portal or similar kind of service that generate fake device token and I as a developer can use that device token and send notification on it. So that portal will display me notification text and other payload info.
I try to search things online but no luck. I have also asked to many mobile developer and my colleagues for this. They don't have any idea for this.
I am not sure that this kind of service is available yet or not.
So thought, will try to ask genius people of this forum.
Thanks in advance.
I have the existing app that using GCM and have some issue with GCM reliability. I interested using FCM to replace the GCM, but I doubt about compatibility. I've some google search but still couldn't find a satisfactory answer, here some link:
Migrating from gcm to fcm on android
If FCM inherits from GCM, does FCM also support GCM token? Or we need to some config in the server (using gcm-http.googleapis.com/gcm/ vs. fcm.googleapis.com/fcm/request in one server?)
I still doubt to migrating GCM to FCM, so I need some ideas from you all guys and I think send a notification from FCM console is not scalable for me because of too many notifications that triggered by user activities. Thanks
As much as I have understood from reading various documents and watching youtube recordings of 2016 I/O, FCM appears to be rebranded GCM. Server side integration will stay the same with option to switch endpoint domain name. When look a little closer you see that both domain names are referring to same IP address.
From client side integration much more has changes. FCM has a new SDK which makes certain things little easier to manage. Not sure if there are any improvements in terms of keeping app connected to the backend, listening incoming messages.
I've read the document about FCM, but I wonder if I should deploy a FCM server myself. Does the google cloud platform not provide FCM server? Or do I must implemented my own FCM server refering to the official reference implementation, gcm-playgroud?
It depends. (How's that for an answer?)
By "server", I'm assuming you mean, "Code I will be running on the server level to communicate with the FCM service". And honestly, the answer depends on whether or not you need extra functionality that's not supplied by the Firebase Notifications panel.
You can do a lot with Firebase Notifications, including sending scheduled messages, or sending messages to individual users, topics, or Audiences. But that is work that is done manually. If you just want to send the occasional promotional message to your users, you shouldn't need a server.
On the other hand, maybe you've got a messaging app and you want to send a notification to your user anytime they receive a new message. Well, that's clearly something that needs to be automated, and that requires some server-side code. So for that, you will need to set up your own server that communicates with FCM.
We are developing an Banking Mobile application using MobileFirst V7.1 which should be much secured. I implemented the normal IBM MobileFirst push notification in our application.
Following are the requirements from the client:
1) To send some sensitive information to the customer as notification, hence want to send secured or encrypted push notification messages to the mobile client from MobileFirst server through GCM or APNS. Is there any built-in Worklight/MobileFirst API available to fullfill the requiremnt, Can anyone please help me in suggesting some solution to fullfill this requirement. It will be very greatful if some one give me solutions for this.
2) Also Client requirement is to send platform specific notification, some push notification to be send only to Iphone and some specific notification only to Android devices. Is there any option in the SubmitNotification() method to send platform specific push notifications.
3) Currenly we are providing a url "http://IPAddress:8080/invoke?adapter=ADAPTER_NAME&procedure=PROCEDURE_NAME¶meters=[PARAMETER1,PAREMETER2,...]" to the web service team to hit this URL to send the push notifications. Currently this URL is public any anyone who knows the URL can execute or hit the URL and send the notification. I need to protect this URL where no unknown resource or unauthorised person should access the URL. If some tries to hit/access the URL, it should ask for the credentials and the URL should be secured as we are dealing with Banking application everything should be secured hence the push notification URL should be secure. Can anyone please tell me how to implement this.
Thanks in advance
Karthik
Your first question has already been previously answered; don't duplicate your own questions: secured or encrypted push notification messages from MobileFirst server
For your second question, send separate notifications. Once for APNS and once for GCM... and you should use the submitMessage API instead. See here: http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.apiref.doc/html/refjavascript-server/html/WL.Server.html#sendMessage
Your third question should be directed at your own IT Security team, because this is something that you need to do in your organization. Your IT team should know how to protect internal resources with your firewall settings, to not allow incoming connections from the public internet, but only internal connections from your organization network.