Skip to content

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)

License

rezkyatinnov/Kyandroid

Repository files navigation

Kyandroid

license

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)

Features

  • 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

Install

See complete guide of install by jitpack here

gradle

1. Add the JitPack repository to your build file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

2. Add the dependency

dependencies {
    compile 'com.github.rezkyatinnov:kyandroid:1.0.0-rc7'
}

Usage

Initiate in Custom Application Class or Launcher Activity

Kotlin Example

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())
    }
}

Java Example

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

Contributing

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!

Author

Rezkya Tinnov : mailme@rezkyatinnov.com

License

About

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)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages