A reusable libraries wrapper to kick start an android project. Current version featuring Retrofit and Realm. Easier use of retrofit and realm. Easy session management (stored on realm)
- Rest client using Retrofit
- Local data management using Realm
- Session Management using LocalData on Realm
- RxJava/RxJava2 enable
- optional use of Rx Observer as callback on Reztrofit
See complete guide of install by jitpack here
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.rezkyatinnov:kyandroid:1.0.0-rc7'
}
class ExampleApp: Application() {
override fun onCreate() {
super.onCreate()
Kyandroid.setDbKey("replace this with 64 long string")
Kyandroid.init(this,
"http://api.example.com/",
ExampleRestService::class.java,
"Shared Preff Name",
Context.MODE_PRIVATE,
"SCHEMA_NAME",
1,
true,
KyandroidRealmModule(),
ExampleRealmModule())
}
}
public class ExampleApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Kyandroid.setDbKey("replace this with 64 long string");
Kyandroid.init(this,
"http://api.example.com/",
ExampleRestService.class,
"Shared Preff Name",
Context.MODE_PRIVATE,
"SCHEMA_NAME",
1,
true,
KyandroidRealmModule(),
ExampleRealmModule());
}
}
Currently an example project is in progress. you can check them here
Contributions welcome; Please submit all pull requests against the develop branch. This repo is following gitflow branching model GitFLow. If your pull request contains JavaScript patches or features, you should include relevant unit tests. Thanks!