Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
透過 GCM 實作跨裝置資料同步
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
190
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
160
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
180
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
200
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
200
React改造してみた
tsukina_7mochi
0
110
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
440
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
290
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
890
会社紹介資料 / Sansan Company Profile
sansan33
PRO
31
430k
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
740
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Embracing the Ebb and Flow
colly
88
5.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
A designer walks into a library…
pauljervisheath
211
25k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
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)