android - How FCM knows who will receive upstream message? -
i developing app using firebase cloud messaging. , want send notification message device other device in topic group "teamandroid". read on firebase official site code send upstream messages:
firebasemessaging fm = firebasemessaging.getinstance(); fm.send(new remotemessage.builder(sender_id + "@gcm.googleapis.com") .setmessageid(integer.tostring(msgid.incrementandget())) .adddata("my_message", "hello world") .adddata("my_action","say_hello") .build());
but in code put information user want send message? how fcm knows send message sent me?
fcm not offer direct device-to-device messaging facility. "upstream message" here means message being sent phone app server, have implement.
see docs more details.
to send message 1 device another, send app server device 1, in turn sends downstream message device 2.
Comments
Post a Comment