Slide 1

Slide 1 text

Push Notification is Coming!! :PIFJ.VOFTBEB $ZCFS"HFOU *OD )5.-NJOVUFTWPM

Slide 2

Slide 2 text

.VOFTBEB:PIFJ 㾎 ג αΠόʔΤʔδΣϯτॴଐ 㾎 νʔϜϦʔσΟϯάɺάϩεϋοΫɺΤϯδχΞ 㾎 #MPHIUUQXXXZPIFJNOFU 㾎 5XJUUFS!ZPIFJ.VOF

Slide 3

Slide 3 text

ϒϥ΢βͷऑΈʁ

Slide 4

Slide 4 text

8FBLOFTTPGUIF8FC 㾎ωοτϫʔΫपΓ 㾎ϨϯμϦϯά΍Ξχϝʔγϣϯ 㾎࠶ੜػೳ 㾎ετϨʔδ

Slide 5

Slide 5 text

8FBLOFTTPGUIF8FC 㾎ωοτϫʔΫपΓ 㾎ϨϯμϦϯά΍Ξχϝʔγϣϯ 㾎࠶ੜػೳ 㾎ετϨʔδ ΦϑϥΠϯɺόοΫάϥ΢ϯυಉظɺ164)௨஌ ϒϥ΢βੑೳ61ɺ8FC(-ܥͷٕज़ 8FC"VEJP"1*ɺ8FC.*%*ɺͳͲ 8FC4UPSBHFɺ'JMF"1*ɺͳͲ

Slide 6

Slide 6 text

8FBLOFTTPGUIF8FC 㾎ωοτϫʔΫपΓ 㾎ϨϯμϦϯά΍Ξχϝʔγϣϯ 㾎࠶ੜػೳ 㾎ετϨʔδ ΦϑϥΠϯɺόοΫάϥ΢ϯυಉظɺ164)௨஌ ϒϥ΢βੑೳ61ɺ8FC(-ܥͷٕज़ 8FC"VEJP"1*ɺ8FC.*%*ɺͳͲ 8FC4UPSBHFɺ'JMF"1*ɺͳͲ

Slide 7

Slide 7 text

ωοτϫʔΫܥͷऑΈΛࠀ෰͢Δ 4FSWJDF8PSLFS

Slide 8

Slide 8 text

ωοτϫʔΫܥͷऑΈΛࠀ෰͢Δ 4FSWJDF8PSLFS 㾎 ߴ౓ͳϓϩΩγػೳ 㾎 ΦϑϥΠϯͷ࣮ݱ 㾎 όοΫάϥϯυಉظ 㾎 164)௨஌ 㾎 ͳͲ

Slide 9

Slide 9 text

IUUQTTQFBLFSEFDLDPNDIJOUSPEVDUJPOUP TFSWJDFXPSLFS ࢀߟ

Slide 10

Slide 10 text

IUUQXXXIUNMSPDLTDPNKBUVUPSJBMTTFSWJDF XPSLFSJOUSPEVDUJPO ࢀߟ

Slide 11

Slide 11 text

㾎 $ISPNFʙ 㾎 "OESPJE΋ؚΉ 㾎 ϒϥ΢βΛด͍ͯͯ͡΋164)Λ
 ड͚औΓՄೳ 1VTI/PUJGJDBUJPO

Slide 12

Slide 12 text

1VTI/PUJpDBUJPOͷ࢓૊Έ ᶃߪಡॲཧ ᶄ164)ड͚औΓ ᶅ164)ૹ৴

Slide 13

Slide 13 text

1VTI/PUJpDBUJPOͷ࢓૊Έᶃߪಡॲཧ ࢀߟIUUQVQEBUFTIUNMSPDLTDPNQVTIOPUJpDBUPOTPOUIFPQFOXFC ࢀߟIUUQRJJUBDPNUPNPZVLJMBCTJUFNT⒎GCDCBBE 1BHF +BWB4DSJQU 4FSWJDF 8PSLFS (PPHMF $MPVE .FTTBHJOH www.yoheim.net TVCTDSJCF TVCTDSJCF@JE

Slide 14

Slide 14 text

ࢀߟIUUQVQEBUFTIUNMSPDLTDPNQVTIOPUJpDBUPOTPOUIFPQFOXFC ࢀߟIUUQRJJUBDPNUPNPZVLJMBCTJUFNT⒎GCDCBBE 1BHF +BWB4DSJQU 4FSWJDF 8PSLFS (PPHMF $MPVE .FTTBHJOH 1VTI/PUJpDBUJPOͷ࢓૊Έᶄ1VTIड͚औΓɺᶅ164)ૹ৴ DBMM"1* QVTI/PUJpDBUJPO TIPX/PUJpDBUJPO www.yoheim.net

Slide 15

Slide 15 text

۩ମతͳ࣮૷͸

Slide 16

Slide 16 text

࣮૷Πϝʔδᶃߪಡॲཧ navigator.serviceWorker.ready.then(function (reg) { // ߪಡॲཧ reg.pushManager.subscribe({ userVisibleOnly: true }).then(function (subscription) { console.debug('ߪಡ੒ޭ!!'); // ServerʹߪಡIDΛ௨஌ sendSubscriptionIdToServer(subscription); }); }); 1BHF+BWB4DSJQU

Slide 17

Slide 17 text

࣮૷Πϝʔδᶄ164)ड͚औΓ self.addEventListener('push', function (event) { var title = 'Yay a message.'; var body = 'We have received a push message.'; var icon = './images/icon-192x192.png'; var tag = 'simple-push-demo-notification-tag'; event.waitUntil( self.registration.showNotification(title, { body: body, icon: icon, tag: tag })); }); 4FSWJDF8PSLFS

Slide 18

Slide 18 text

࣮૷Πϝʔδᶅ164)ͷૹ৴ྫʢࢀߟʣ curl --header "Authorization: key=" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d '{"registration_ids":["<ߪಡID>", "<ߪಡID>", ...]}' 5FSNJOBMͳͲ

Slide 19

Slide 19 text

1VTI/PUJGJDBUJPOJT $PNJOH4PPPPPPO $ISPNF͸ࠓ೥ͷ ݄ʹ͸ຊ֨ϦϦʔεʢͷ͸ͣʣ

Slide 20

Slide 20 text

$ISPNF ͱ͋Δ8FCαΠτͷϒϥ΢βγΣΞ ʢ೥݄ʣ

Slide 21

Slide 21 text

·ͱΊ 㾎 ϒϥ΢βͷऑ఺͸ͲΜͲΜࠀ෰͞Ε͍ͯΔ 㾎 164)௨஌͸͙ͦ͢͜ʂ 㾎 ৘ใͷΩϟονΞοϓ͸ੵۃతʹ 㾎 σϞίʔυ͸ͪ͜Βˣˣˣ IUUQTHJUIVCDPNZPIFJ.VOFZPIFJ.VOFHJUIVCJPUSFFNBTUFSQVTIOPUJpDBUJPO

Slide 22

Slide 22 text

IUUQHJUIVCDPNZPIFJ.VOF IUUQXXXZPIFJNOFU IUUQUXJUUFSDPNZPIFJ.VOF 5IBOLZPV;͒ΖʙΈʙ