EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

ionic2 firebase FCM FCM_TOKEN Device_token Sender_id

https://forum.ionicframework.com/t/push-notifications-with-ionic-2/63851/4
https://github.com/fechanique/cordova-plugin-fcm
=====

https://www.youtube.com/watch?v=7yXtzhqT1uk
https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59#.ff6hz41ot


.sender_id   who is sender or This guy is send message.

.FCM_token (api_key)  it's right to use FMC, who get token, then can send

.Device token  this device (which device)


Where is come from?

.sender_id 、 FCM_token from FCM (firebase)

.Device_token from device



How to get?

.sender_id 、 FCM_token : login firebase console -> settings -> colud messageing

.Device_token : If ionic2, when you use
Push @ionic/cloud-angular push.register().then(t: PushToken)
this time get Push Token. see video 7:54



So how to work?  (If see youtube video, I guess)

.FCM_token:   Who take token, who can send message. FCM get FCM_token, then send message to send_id  under all register.

.sender_id: App or reciver must have this info, when message come from FCM into Phone, then check send_id is correct or not.

.Device_token:
A、Device must send(register) phone's Device_toke to FCM sender_id, then register info(device_token) under send_id. If not register, send_id can't know any devices.

B、Sometime send message to only one device, must use FCM_token + Device_token then only send to one device.

(This Video 9:38 bottom have "Device Options")

(https://github.com/aggarwalankush/push-notification-server
AndroidPush.java  see code have "YOUR_DEVICE_TOKEN" )



https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59#.ff6hz41ot
https://devdactic.com/ionic-push-notifications-guide/