EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Feature for XMPP connection for upstreaming messages #133

Open knvpk opened 7 years ago

knvpk commented 7 years ago

AS FCM also supports XMPP connection for upstreaming messages, it would be nice to handle that one in this plugin and provide an API to send message from client (APP) to FCM servers.

knvpk commented 7 years ago

Hi, anybody there?

EddyVerbruggen commented 7 years ago

Hi, do you have a proposal for what you want to see added exactly?

knvpk commented 7 years ago

Add a function in firebase.android.ts file with code below

var fm = com.google.firebase.messaging.getInstance();
var RmtMsg=new com.google.firebase.messaging.RemoteMessage.Builder(SENDER_ID + "@gcm.googleapis.com")
  .setMessageId("randomlygeneratedstring")
  .addData("my_message", "Hello World") //settting from arguments
  .addData("my_action","SAY_HELLO") //settting from arguments
  .build()
fm.send(RmtMsg);