Livebox
Search…
Welcome

Initializing Livebox

Using Livebox is a fairly straight forward process, in you Application class call:
1
// Pass context and wanted serializer.
2
// This creates a Livebox instance with default values.
3
Livebox.init(this, LiveboxGsonSerializer.create());
Copied!
Built-in support for Gson and Jackson.
You can pass a Config instance to fully customize Livebox behaviour.
1
Livebox.init(new Config()
2
.lruCacheConfig(new DiskLruDataSource.Config(
3
new File("somePath") // Cache file path
4
10 * 1024 * 1024// Cache size in bytes
5
))
6
.addSerializer(LiveboxGsonSerializer.create())
7
...
8
);
Copied!
Please check Configuration page for more details.
Last modified 3yr ago
Copy link