본문 바로가기

Mobile/Ionic2

푸시데이터가 앱에서 실행 안될떄

프론터를 마구마구 바꿨는데 뻘짓

서버를 바꿔야 했는데...쩝

already resolve my problem. greetings developers

"priority":"high", //If not set, notification won't be delivered on completely closed iOS app
and
"click_action":"FCM_PLUGIN_ACTIVITY", //Must be present for Android

like this:

//POST: https://fcm.googleapis.com/fcm/send
//HEADER: Content-Type: application/json
//HEADER: Authorization: key=AIzaSy*******************
{
"notification":{
"title":"Notification title", //Any value
"body":"Notification body", //Any value
"sound":"default", //If you want notification sound
"click_action":"FCM_PLUGIN_ACTIVITY", //Must be present for Android
"icon":"fcm_push_icon" //White icon Android resource
},
"data":{
"param1":"value1", //Any data to be retrieved in the notification callback
"param2":"value2"
},
"to":"/topics/topicExample", //Topic or single device
"priority":"high", //If not set, notification won't be delivered on completely closed iOS app
"restricted_package_name":"" //Optional. Set for application filtering
}