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
透過 GCM 實作跨裝置資料同步
Search
Rogery Yang
July 25, 2013
Technology
230
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
透過 GCM 實作跨裝置資料同步
Rogery Yang
July 25, 2013
Other Decks in Technology
See All in Technology
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
16
5.4k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
JavaScript 研修 (2026)
recruitengineers
PRO
0
220
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
180
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
110
[しろおび夏祭り2026] チャットするAIから、作業するAIへ - 使われ方の変化と、その裏側で起きていること
kk0n
0
1.6k
モバイルアプリ開発概論2026
recruitengineers
PRO
1
260
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.6k
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
8
7.6k
NetBoxを利用した作業効率化の試み_NetDevNight4
tnoha
0
460
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
440
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
130
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
450
Speed Design
sergeychernyshev
33
2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Claude Code のすすめ
schroneko
67
230k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
250
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
Producing Creativity
orderedlist
PRO
348
40k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Navigating Team Friction
lara
192
16k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Limits of Empathy - UXLibs8
cassininazir
1
580
Transcript
Rogery! Android Team Leader! 透過 GCM 實作跨裝置資料同步 @Android Taipei
• 關於 Rogery & KKBOX Android Team • Concept
& Idea • Implement • Demo • Q & A Agenda
• 從 Android 1.0 開始研發 KKBOX Android, 開發經驗至今已四年以上
• 在 KKBOX 擔任 Android Team Leader • 熱愛音樂創作的工程師 http://youtu.be/IwsNKobAkS0 關於 Rogery
• 產品:KKBOX Android, KKBOX Music Store, UtaPass • 裝置:Handset,
Tablet, STB 和車機 • 團隊人數從 1 人到 11 人 關於 KKBOX Android Team
Concept & Idea
GCM (Google Cloud Message) • 幫助開發者發送推播訊息到各個 Android 裝置 •
首次在 Google IO 2012 亮相 • 前身是 C2DM (Cloud to Device Messaging)
KKBOX use GCM • Push NoPficaPon: 推播跟隨的臺長已經上線訊息 • 只用在訊息通知
Concept & Idea 直到我看見…
Google IO 2013 – StopWatch Demo
Concept & Idea 怎麼能那麼即時同步?
Concept & Idea Think: KKBOX 能用在哪裡?
Concept & Idea 歌單立即同步?!
Polling vs Pushing • Polling: 每個裝置定期去向 Server 問目前最新的狀態 •
目前 KKBOX 實作歌單同步的方式 • 容易實作 • 耗電:手機一直送連線、Server 一直收連線
Polling vs Pushing • Pushing: 當 Server 有狀態更新時去通知裝置
• 省電:連線數降低、Server Loading 降低
Implement
POC KKGCMSyncServer (Google App Engine) KKGCMSyncClient
Registration (1) (2) (3) 1. register GCM -‐ ref.1
2. return GCM registraPon ID - ref.1 ref.2 3. put registracPon ID to server -‐ ref.3
Push & Sync (2) (3) (1) 1. push change to
server -‐ ref.1 ref.2 2. send sync message to GCM -‐ ref.3 3. client receive sync message from GCM -‐ ref.4 4. pull change from server -‐ ref.5 5. return change to client -‐ ref.6 (4) (5)
Demo 1 POC: GCMSyncList
Demo 2 KKBOX GCM Sync
Demo Source • KKGCMSyncServer – GitHub - https://github.com/rogery/KKGCMSyncServer • KKGCMSyncClient
– GtiHub - https://github.com/rogery/KKGCMSyncClient
References • C2DM - https://developers.google.com/android/c2dm/ • GeYng Started with
GCM – Android Developer -‐ http://developer.android.com/google/gcm/gs.html • Google Cloud Messaging for Android – Google I/O 2012 -‐ https://developers.google.com/events/io/2012/sessions/gooio2012/100/ • StopWatch Demo – Google I/O 2013 -‐ http://bradabrams.com/2013/06/google-io-2013-demo-android-studio- cloud-endpoints-synchronized-stopwatch-demo/
None
Thank You
[email protected]
Rogery Yang 楊哲豪(Rogery)