Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Push通知を届けるために
Search
futabooo
July 14, 2015
Programming
1
3.4k
Push通知を届けるために
futabooo
July 14, 2015
Tweet
Share
More Decks by futabooo
See All by futabooo
Android Jetpack Navigation Deep Links Tips
futaboooo
0
550
チームの学びを活かす全社での取り組み / company wide efforts to make use of team's learning
futaboooo
1
650
ペアプロ・モブプロを広めるのに役立ったControl Chartの使い方 / How to use Control Chart which helped spread Pair or Mob Programing
futaboooo
2
270
スクラムチームをやめて、20人でカンバン運用してきた半年間の軌跡 / Stop Scrum Start Kanban
futaboooo
19
18k
InvisionのAndroidアプリでみる4つのデザイン基本原則 / Four design basic principles seen in Invision's Android application
futaboooo
2
2.3k
Pairsの開発のすべて / all of Pairs development
futaboooo
1
2.5k
モブプログラミングという開発スタイル、あるいは生産性について / On development style called mob programming, or productivity
futaboooo
5
8.5k
Androidでスクレイピングした話 / Talk of scraping with Android
futaboooo
0
5.2k
新人スクラムマスターが開発者と兼任しながらやってきた事と成果/What the newcomer Scrum Master came while concurrently serving as a developer and the result
futaboooo
1
1.8k
Other Decks in Programming
See All in Programming
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
Exploring: Partial and Independent Composables
blackbracken
0
100
たのしいparse.y
ydah
3
120
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
830
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
470
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
700
testcontainers のススメ
sgash708
1
120
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Jakarta EE meets AI
ivargrimstad
0
260
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Making Projects Easy
brettharned
116
5.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
BBQ
matthewcrist
85
9.4k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Six Lessons from altMBA
skipperchong
27
3.5k
Statistics for Hackers
jakevdp
796
220k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
For a Future-Friendly Web
brad_frost
175
9.4k
GraphQLとの向き合い方2022年版
quramy
44
13k
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 :)