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
SQLite Provider: Database access made easy
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
David González
January 29, 2014
Technology
350
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SQLite Provider: Database access made easy
David González
January 29, 2014
More Decks by David González
See All by David González
A comprehensive guide to tracker protection on Android
malmstein
1
100
Building a Multiplatform library for iOS and Android
malmstein
9
1.3k
Unidirectional Data Flow on Android
malmstein
6
560
Introduction to Kotlin Coroutines
malmstein
0
190
A State Container Architecture for mobile applications
malmstein
0
170
Things I wish I knew before starting to work remote
malmstein
0
120
Remote, lonely and productive
malmstein
0
210
The source of all technical debt
malmstein
6
460
Android Architecture Blueprints
malmstein
0
330
Other Decks in Technology
See All in Technology
データ_AIの事業の勝敗をわけるもの
nek0128
1
480
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
270
Why Agent Cost Needs Observability
nttcom
0
140
AI時代、データエンジニアが一番おもろい
genshun9
0
690
品質と信頼性を地続きにする
grimoh
2
950
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
710
SREは、MCPとAutopilotをこう使え!
kazumax55
3
950
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
150
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
470
AI coding 整合正規方法
philipz
0
510
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
0
490
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
700
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.3k
Become a Pro
speakerdeck
PRO
31
6.3k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Rails Girls Zürich Keynote
gr2m
96
14k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
550
Speed Design
sergeychernyshev
33
2.1k
Transcript
SQLite Provider: A simplification of database access David Gonzalez
Content Providers Managers of structured data Abstract underlying data storage
Allow external access to data
Manage connection to data source
Easy access to data
Implicit intents
Loader callbacks
Provide data to external apps
PROBLEMS — And we had to fix them
Boilerplate code
DB versioning
JSON to SQL mapping
Create the database public ExampleDatabase(Context context, CursorFactory factory, int version)
{ super(context, DATABASE_NAME, factory, version); } @Override public void onCreate(SQLiteDatabase db) { createDatabase(db); }
protected void createDatabase(SQLiteDatabase db) { final String articleTable = "CREATE
TABLE articles" // + " ('" // + _id + "' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, '" // + title + "' TEXT, '" // + content + "' TEXT, '" // + timestamp + "' TIMESTAMP NOT NULL );"; db.execSQL(articleTable); @Override public void onCreate(SQLiteDatabase db) { createDatabase(db); }
Upgrade it @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) { if (oldVersion == 0) { db.execSQL("DROP TABLE article"); createDatabase(db); } }
Upgrade it ContentResolver resolver = getContentResolver(); String[] projection = new
String[] {UserDictionary.Words._ID, UserDictionary.Words.WORD}; String selectionClause = UserDictionary.Words.WORD + " = ?"; String[] selectionArgs = new String[] {"Android"}; String sortOrder = UserDictionary.Words.WORD + " ASC”; Cursor cursor = resolver.query(UserDictionary.Words.CONTENT_URI, projection, selectionClause, selectionArgs, sortOrder);
Our solution https://github.com/novoda/SQLiteProvider