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
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Arm移行タイムアタック
qnighy
0
310
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Embracing the Ebb and Flow
colly
84
4.5k
Music & Morning Musume
bryan
46
6.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Code Review Best Practice
trishagee
64
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Teambox: Starting and Learning
jrom
133
8.8k
Designing for humans not robots
tammielis
250
25k
What's in a price? How to price your products and services
michaelherold
243
12k
Unsuck your backbone
ammeep
668
57k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
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.