Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 3.18 KB

README.md

File metadata and controls

61 lines (41 loc) · 3.18 KB

Kripton-examples

Some examples showing how to use Kripton Persistence Library.

Kripton with Content Providers Sample

This sample demonstrates how to expose data stored in the Kripton persistence library with Android's Content Provider framework.

This is a porting of the Room Persistence Content Provider Sample.

https://github.com/xcesco/kripton-examples/tree/master/PersistenceContentProviderSample

This sample is associated to my post.

Kripton SQLite Migration Sample

This is a Kripton version of PersistenceMigrationsSample by Google.

https://github.com/xcesco/kripton-examples/tree/master/PersistenceMigrationsSample

This sample was originally written for this article.

Kripton Benchmarks

How Kripton is fast to parse and convert JSON data format?

https://github.com/xcesco/kripton-examples/tree/master/kripton-benchmark

For more information you read wiki page Benchmarks

Rss Reader

This example get an BBC's RSS feed channel (XML) from a REST service, store feeds in a SQLite database and show it. Data management is done using ViewModel, LiveData and Kripton Persistence Library.

Code is available here.

The RSS Feed is here:

http://feeds.bbci.co.uk/news/rss.xml?edition=int

This simple app was built as showroom for some features of Kripton:

  • Integration with Retrofit to consume REST service
  • Convert XML into Java beans
  • Persist data on SQLite database
  • How to embed an entity in a field and how to use it as sqlite table
  • How to use a unique model rapresentations for REST services and SQLite persistence
  • SQLite type adapter usage
  • SQLite relationship definition
  • How generate Live Data from DAO queries
  • How to use Kripton in a ViewModel
  • How to write queries in compact mode
  • How to use dynamic where conditions in SQL queries

You can also read Kripton Live Data — First contact.

Shared Preferences with Live Data

This example show how Kripton allows managing Shared Preferences with Live Data.

shared-preference-livedata

For more information read my article on medium Kripton Library vs. Shared Preferences