#fff2ae
1 catatan
83 view
Tue, 26 Jul 2016 12:23 am
Command untuk menampilkan payload push notification saat chrome berjalan di background, dan melakukan fetch saat foreground.
C:\Users\luqman baihaqi>curl --header "Authorization: key=AIzaSyAhhhFjJGhA0q0CgmZMVQzuV9I-cRLTCiA" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d "{\"to\":\"ca1CvrW69kQ:APA91bGi_Ue4kyVPkQp86ZJoLzSx_OH9r-bzCQAse28QP1ucsTgadHmCwpTWOlDYnjELhDD_SGO9Mhm_zKyr-qQbuBCCy_GQJ5GHLSU8-8RKIO9ypx8omi_tPSUG7RUXK9nNgyOi46ek\", \"notification\":{\"title\":\"my title\",\"body\":\"the messages\",\"icon\":\"/static/custom/images/turtle.ico\", \"color\":\"#fff2ae\",\"click_action\":\"com.google.android.apps.chrome.Main\"}}" -k
https://developers.google.com/cloud-messaging/concept-options https://developers.google.com/cloud-messaging/concept-options#common-message-options https://developers.google.com/cloud-messaging/http-server-ref#priority1. Bagaimana saat notification payload di click, mengarah ke url yang diinginkan. Sampai sejauh ini, click tidak bereaksi apa2. 2. Tetap harus nyari cara supaya data bisa dikirim ke service worker....#webkoe