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
Offline mode in Android apps
Search
Jerzy Chalupski
December 07, 2013
Programming
4
1.3k
Offline mode in Android apps
The talk I gave on KrakDroid 2013 conference.
Jerzy Chalupski
December 07, 2013
Tweet
Share
More Decks by Jerzy Chalupski
See All by Jerzy Chalupski
Rx
chalup
19
700
ProGuard
chalup
10
980
Data model on Android
chalup
9
3.7k
Other Decks in Programming
See All in Programming
Recoilを剥がしている話
kirik
5
6.6k
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
命名をリントする
chiroruxx
1
390
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
1
170
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
720
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
320
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
RailsConf 2023
tenderlove
29
940
Designing Experiences People Love
moore
138
23k
KATA
mclloyd
29
14k
A Philosophy of Restraint
colly
203
16k
How STYLIGHT went responsive
nonsquared
95
5.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Designing for humans not robots
tammielis
250
25k
Transcript
! Jerzy Chalupski chalup, futuresimple "
[email protected]
Offline mode in
Android apps Base CRM http://porcupineprogrammer.blogspot.com/ #
WHAT WHY HOW
WHAT is offline mode?
What happens when you send and email from Gmail app?
What happens if your connection is down?
What happens if your connection is down?
None
RECAP Offline mode = fully functional app without connection
WHY should I bother?
Life is too short to worry about the internet connection.
I had to watch the animated circle for 2 seconds.
They want to post the photos of their dinner on
Instagram! People want to DO THINGS!
SLOOOOOOW TIMEOUTS RETRYS NETWORK ERRORS HANDLING LIT SCREEN DATA PLAN
USAGE
ˑˑˑˑ˒ “Unbearably sloooooow.”
ˑˑˑˑ˒ “Drains my battery.”
ˑˑˑˑ˒ “Crashes all the time.”
None
RECAP BETTER UX
RECAP BETTER UX BETTER BATTERY LIFE
RECAP BETTER UX BETTER BATTERY LIFE BETTER CODE
RECAP BETTER UX BETTER BATTERY LIFE BETTER CODE
HOW do I implement it?
UI Http Client
UI Http Client SLOW FLAKY
UI Http Client SLOW FLAKY CACHE ALL THE THINGS!
Http Client SLOW FLAKY Storage FAST RELIABLE UI
Storage Http Client SLOW FLAKY UI FAST RELIABLE GET
Http Client SLOW FLAKY Storage FAST RELIABLE UI GET POST
Sync Service Http Client UI Storage GET POST
AbstractThreadedSyncAdapter Http Client UI ContentProvider SQLite DB CursorLoader
Sync Service Http Client UI Storage
Sync Service Http Client UI Storage
Sync Service Http Client UI Storage
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE 250k items?
BACKEND MOBILE ?
BACKEND MOBILE
BACKEND MOBILE
BACKEND MOBILE OFFLINE MODE = DATA MIGRATIONS
As pleasant as data migrations with SQLiteOpenHelper.
BACKEND MOBILE 1 2 1 2
BACKEND MOBILE 1 2 1 2 3
BACKEND MOBILE 1 2 1 2 3 3
BACKEND MOBILE 1 2 1 2 3 3 3
BACKEND MOBILE 1 2 1 2 3 3 3
BACKEND MOBILE 1A 2B 1 2
BACKEND MOBILE 1A 2B 1 2 3
BACKEND MOBILE 1A 2B 1 2 3 C
BACKEND MOBILE 1A 2B 1 2 3 C C
BACKEND MOBILE 1A 2B 1 2 3 C 4C C
BACKEND MOBILE 1A 2B 1 2 3 C 4 3
4C
BACKEND MOBILE 1A 2B 1 2 3 4 3 4C
BACKEND MOBILE 1A 2B 1 2 3 4 3D 4C
BACKEND MOBILE 1A 2B 1 2 2 3C 3
BACKEND MOBILE 1A 2B 1 2 2 2 3C 3
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 ?
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D D
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D 4D D
BACKEND MOBILE 1A 2B 1 2 2 D 2 3C
3 D 4D 4D
4D BACKEND MOBILE 1A 2B 1 2 2 2 3C
3 D 4
4D BACKEND MOBILE 1A 2B 1 2 2 2 3C
3 4 4
4D BACKEND MOBILE 1A 2B 1 2 2 2 3C
3 4 4
“My friend, you’re entering a world of pain” WALTER SOBCHAK
UUID
RECAP OFFLINE MODE = MIGRATIONS
RECAP UUID OR WORLD OF PAIN OFFLINE MODE = MIGRATIONS
Sync Service Http Client UI Storage
Sync Service Http Client UI Storage
“For every complex problem there is an answer that is
clear, simple and wrong.” HENRY LOUIS MENCKEN
Sync Service Http Client UI Storage CONFLICTS
Sync Service Http Client UI Storage CONFLICTS DUPLICATES
Sync Service Http Client UI Storage CONFLICTS HANDLING LARGE DATA
SETS DUPLICATES
Sync Service Http Client UI Storage CONFLICTS HANDLING LARGE DATA
SETS DUPLICATES BATTERY USAGE
None
!futuresimple chalup
?
Thanks.