Slide 1

Slide 1 text

Push௨஌Λಧ͚ΔͨΊʹ #potatotips 19 @futabooo

Slide 2

Slide 2 text

About me futabooo (Takahiro futagawa) - Engineer @eureka - Android Developer - ࠷ۙ฀ΓΛײ͍ͯ͡Δ͜ͱ - Ϋϥ΢υϑΝ΢ϯσΟϯάͰߪೖͨ͠ ೣࣖܕϔουϑΥϯͷ։ൃ஗Ԇ 4݄഑ૹ → 10݄഑ૹ http://www.axentwear.jp/

Slide 3

Slide 3 text

About eureka

Slide 4

Slide 4 text

ࠓ೔࿩͢͜ͱ

Slide 5

Slide 5 text

ࠓ೔࿩͢͜ͱ - InstanceID - RegistrationID(iOSͰ͍͏σόΠετʔΫϯ) - τϥϒϧγϡʔςΟϯά

Slide 6

Slide 6 text

GCMʹ͍ͭͯ

Slide 7

Slide 7 text

GCMͷྲྀΕ https://developers.google.com/cloud-messaging/gcm - ࣄલʹRegistrationIDΛอଘ - αʔό͔ΒRegistrationIDΛ࢖ͬͯ PushΛૹ৴ RegistrationID

Slide 8

Slide 8 text

GCMͷ࣮૷ʹ͍ͭͯ - ࣮૷ํ๏͸ެࣜυΩϡϝϯτࢀর https://developers.google.com/cloud-messaging/android/legacy-regid - ΞϓϦΞοϓσʔτͰRegistrationID͕ มߋ͞ΕΔͱ͜Ζ΋Χόʔ - ୺຤ͷ࠶ىಈͰ΋มߋ͞ΕΔ৔߹͕͋Δ αʔόʹมߋޙͷIDΛૹΒͳ͍ͱ ಧ͔ͳ͘ͳΔ

Slide 9

Slide 9 text

୺຤ͷ࠶ىಈʹରԠ AndroidManifest.xml

Slide 10

Slide 10 text

୺຤ͷ࠶ىಈʹରԠ BootReceiver.java @Override public void onReceive(Context c, Intent i) { //RegistrationIDͷ࠶ొ࿥ॲཧ }

Slide 11

Slide 11 text

τϥϒϧγϡʔςΟϯά

Slide 12

Slide 12 text

τϥϒϧγϡʔςΟϯά - GCM਍அ https://support.google.com/googleplay/android-developer/answer/2663268

Slide 13

Slide 13 text

τϥϒϧγϡʔςΟϯά - GCM਍அ εςʔλεʹΑͬͯMessage͕ਖ਼ ৗʹಧ͍͔ͨͲ͏͔֬ೝͰ͖Δ

Slide 14

Slide 14 text

͓·͚

Slide 15

Slide 15 text

͓·͚ - અిΞϓϦ - ୺຤ͷઅిػೳ - wifiͷ੾அ - Serviceͷఀࢭ Push௨஌Λಧ͚ΔͨΊͷઓ͍͸ଓ͘ - DozeϞʔυ

Slide 16

Slide 16 text

Thank you :)