Your SlideShare is downloading. ×
0
Providers
Providers
Providers
Providers
Providers
Providers
Providers
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Providers

413

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
413
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Content Providers made easier with SQLiteProvider
  • 2. What are they? • Managers of Structured Data • Abstract underlying data storage • Allow external access to data by apps
  • 3. Why use them? • Manage Connection to data source (open, close connection and so on) • Easily access data • Provide data to external apps if required • Search Suggestions • Sync Adapter • Implicit Intent • Loader callbacks
  • 4. So what is the problem? • • • • • • • • Boilerplate code between projects Maintaining DB version Its not thread safe Json – SQL mapping Logic distributed over different parts of the app Lack of visibility of whats going on Rigidity of the API in making queries Any change to content on the UI must result in a corresponding change to backend data i.e. deletes involves a round trip to the DB
  • 5. What can we do? Libraries – – – – SQLiteProvider: https://github.com/novoda/SQLiteProvider stORM: https://code.google.com/p/storm-gen/ GreenDAO: http://greendao-orm.com/ ……….Enter your favourite library here
  • 6. SQLiteProvider • Already implemented boilerplate code • Versioning is relatively easy • Additional uri options is supported such as “limit” – content://com.example.sqliteprovider/users?limit=5 – content://com.example.sqliteprovider/user?groupBy=dob – content://com.example.sqliteprovider/users?name=“Akshay Dashrath”
  • 7. Any questions?

×