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.2k
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
Identifying User Idenity
moro
6
7.9k
役立つログに取り組もう
irof
27
8.7k
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
150
デプロイを任されたので、教わった通りにデプロイしたら障害になった件 ~俺のやらかしを越えてゆけ~
techouse
52
32k
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
1.7k
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
Piniaの現状と今後
waka292
5
1.5k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
What's new in Ruby 2.0
geeforr
342
31k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Designing Experiences People Love
moore
138
23k
Being A Developer After 40
akosma
86
590k
What's in a price? How to price your products and services
michaelherold
243
12k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
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.