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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
860
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
110
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
230
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
400
20260903 Tokyo Jazug Night #62 | Azure エンジニアよ、 その環境は本当にセキュアか?
olivia_0707
1
620
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
0
150
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
340
生成AI時代の クレデンシャルとパーミッション設計
nrinetcom
PRO
3
1.5k
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
270
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
150
PM領域でのAI Agentの活用
lycorptech_jp
PRO
0
270
少人数データチームのDevin活用実践事例
runandy16
2
450
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
500
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Chasing Engaging Ingredients in Design
codingconduct
0
300
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
Abbi's Birthday
coloredviolet
3
9.8k
30 Presentation Tips
portentint
PRO
1
390
For a Future-Friendly Web
brad_frost
183
10k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
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)