Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Push通知を届けるために
futabooo
July 14, 2015
Programming
1
3.2k
Push通知を届けるために
futabooo
July 14, 2015
Tweet
Share
More Decks by futabooo
See All by futabooo
Android Jetpack Navigation Deep Links Tips
futaboooo
0
390
チームの学びを活かす全社での取り組み / company wide efforts to make use of team's learning
futaboooo
1
440
ペアプロ・モブプロを広めるのに役立ったControl Chartの使い方 / How to use Control Chart which helped spread Pair or Mob Programing
futaboooo
2
190
スクラムチームをやめて、20人でカンバン運用してきた半年間の軌跡 / Stop Scrum Start Kanban
futaboooo
19
17k
InvisionのAndroidアプリでみる4つのデザイン基本原則 / Four design basic principles seen in Invision's Android application
futaboooo
2
1.9k
Pairsの開発のすべて / all of Pairs development
futaboooo
1
2k
モブプログラミングという開発スタイル、あるいは生産性について / On development style called mob programming, or productivity
futaboooo
5
7.6k
Androidでスクレイピングした話 / Talk of scraping with Android
futaboooo
0
4.5k
新人スクラムマスターが開発者と兼任しながらやってきた事と成果/What the newcomer Scrum Master came while concurrently serving as a developer and the result
futaboooo
1
1.5k
Other Decks in Programming
See All in Programming
ESM移行は無理だけどおれもSindreのライブラリが使いたい!
sosukesuzuki
2
540
Cloudflare WorkersでGoのHTTPサーバーを動かすライブラリを作った話
syumai
0
150
閱讀原始碼 - 再戰十年的 jQuery
eddie
1
290
ECサイトの脆弱性診断をいい感じにやりたい/OWASPKansaiNight_LT1_220727
owaspkansai
0
290
MLOps勉強会_20220810
strsaito
0
270
夕食断食にTRY!/for-lt-12th
pachikuriii
0
230
How to start contributing to Kubernetes Projects
ydfu
0
140
Rector, time to refactor your code easily
guikingone
2
150
10歳の minne から、これから長く続くプロダクトを作るすべての人へ
tsumichan
9
3.6k
VIMRC 2022
achimnol
0
130
ベストプラクティス・ドリフト
sssssssssssshhhhhhhhhh
1
210
Untangling Coroutine Testing (Droidcon Berlin 2022)
zsmb
1
480
Featured
See All Featured
Scaling GitHub
holman
451
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
655
120k
Become a Pro
speakerdeck
PRO
3
910
GitHub's CSS Performance
jonrohan
1020
420k
Side Projects
sachag
450
37k
The Illustrated Children's Guide to Kubernetes
chrisshort
18
40k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Why You Should Never Use an ORM
jnunemaker
PRO
47
7.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Unsuck your backbone
ammeep
659
55k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
Agile that works and the tools we love
rasmusluckow
319
19k
Transcript
Push௨Λಧ͚ΔͨΊʹ #potatotips 19 @futabooo
About me futabooo (Takahiro futagawa) - Engineer @eureka - Android
Developer - ࠷ۙΓΛײ͍ͯ͡Δ͜ͱ - ΫϥυϑΝϯσΟϯάͰߪೖͨ͠ ೣࣖܕϔουϑΥϯͷ։ൃԆ 4݄ૹ → 10݄ૹ http://www.axentwear.jp/
About eureka
ࠓ͢͜ͱ
ࠓ͢͜ͱ - InstanceID - RegistrationID(iOSͰ͍͏σόΠετʔΫϯ) - τϥϒϧγϡʔςΟϯά
GCMʹ͍ͭͯ
GCMͷྲྀΕ https://developers.google.com/cloud-messaging/gcm - ࣄલʹRegistrationIDΛอଘ - αʔό͔ΒRegistrationIDΛͬͯ PushΛૹ৴ RegistrationID
GCMͷ࣮ʹ͍ͭͯ - ࣮ํ๏ެࣜυΩϡϝϯτࢀর https://developers.google.com/cloud-messaging/android/legacy-regid - ΞϓϦΞοϓσʔτͰRegistrationID͕ มߋ͞ΕΔͱ͜ΖΧόʔ - ͷ࠶ىಈͰมߋ͞ΕΔ߹͕͋Δ
αʔόʹมߋޙͷIDΛૹΒͳ͍ͱ ಧ͔ͳ͘ͳΔ
ͷ࠶ىಈʹରԠ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> AndroidManifest.xml <receiver android:name=".BootReceiver"> <intent-filter> <action
android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver>
ͷ࠶ىಈʹରԠ BootReceiver.java @Override public void onReceive(Context c, Intent i)
{ //RegistrationIDͷ࠶ొॲཧ }
τϥϒϧγϡʔςΟϯά
τϥϒϧγϡʔςΟϯά - GCMஅ https://support.google.com/googleplay/android-developer/answer/2663268
τϥϒϧγϡʔςΟϯά - GCMஅ εςʔλεʹΑͬͯMessage͕ਖ਼ ৗʹಧ͍͔ͨͲ͏͔֬ೝͰ͖Δ
͓·͚
͓·͚ - અిΞϓϦ - ͷઅిػೳ - wifiͷஅ - Serviceͷఀࢭ Push௨Λಧ͚ΔͨΊͷઓ͍ଓ͘
- DozeϞʔυ
Thank you :)