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
Jerzy Chałupski - Offline mode in Android apps
Search
Base Lab
January 15, 2014
Programming
3
470
Jerzy Chałupski - Offline mode in Android apps
A talk delivered at KrakDroid 2013 conference.
Base Lab
January 15, 2014
Tweet
Share
More Decks by Base Lab
See All by Base Lab
Szymon Sobczak - Hadoop + Storm
baselab
0
93
Slawek Skowron - Monitoring @ Scale
baselab
0
110
Karol Nowak - Monitoring clock drift in Amazon EC2 environment
baselab
0
100
Tomasz Nowak - Web Application Testing made easy
baselab
0
280
Szymon Pawlik - UX i Automatyzacja czyli jak testerzy mogą poprawić produkt.
baselab
0
240
Mateusz Herych - LIKE '%smth%' is not the way
baselab
0
130
Jerzy Chałupski - Data model on Android
baselab
4
210
Other Decks in Programming
See All in Programming
The Shape of a Service Object
inem
0
520
GenU導入でCDKに初挑戦し、悪戦苦闘した話
hideg
0
170
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
230
How to Break into Reading Open Source
kaspth
2
220
React + TextAliveでカッコいいLyric Applicatioinを作ろう!!
tosuri13
0
400
Swiftコードバトル必勝法
toshi0383
0
170
Rubyのobject_id
qnighy
6
1.3k
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
150
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
680
Patched fetch did not work
quramy
4
380
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
650
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
120
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Adaptive Systems
keathley
36
2.1k
How to train your dragon (web standard)
notwaldorf
85
5.6k
Teambox: Starting and Learning
jrom
131
8.7k
Writing Fast Ruby
sferik
623
60k
Designing on Purpose - Digital PM Summit 2013
jponch
114
6.8k
Statistics for Hackers
jakevdp
794
220k
What the flash - Photography Introduction
edds
67
11k
Visualization
eitanlees
142
15k
Designing Experiences People Love
moore
138
23k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
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.