Skip to content

BelieveInTheLimitless/fineract-android-sdk

 
 

Repository files navigation

Mifos Android Architecture

This is architecture repository for mifos-android-sdk

Fineract API Client Library GitHub Workflow Status Jitpack License: MPL 2.0

A Kotlin based SDK that can be used to interact with the Apache Fineract 1.x Platform. This library depends on Fineract Client Library and exposes the use cases, providing abstraction layer and eliminating the need to take care of building the client. Client application can directly interact with the classes that provide simple methods for interacting with the API.

Feature

  1. Extend UserPreferences<USER> and BasePreferenceManager classes for handling the preferences tasks.

  2. The returned data can be easily casted as per client need using EntityMapper and AbstractMapper

  3. Single point of interaction for all the api services using BaseApiManager.

  4. Use of Kotlin provides endless possibilities to manipulate dat in our own way, client can define custom mapping logic and apply it to Observable<T>.

    fun <T, To> Observable<T>.map(entityMapper: EntityMapper<T, To>): Observable<To> {
            return this.map { entityMapper.mapFromEntity(it) }
    }

Add Gradle Dependency

To add library in your gradle project follow the steps below:

  1. Add this in your root build.gradle at the end of repositories:
    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }
  2. Add the dependency
    dependencies {
        def sdk_Version = '1.0.2'
        implementation "com.github.openMF:mifos-android-sdk-arch:$sdk_Version"
    }

Architecture

  1. The core module in the SDK contains all the API requests written.
  2. The entry point to the library is the BaseApiManager.
  3. Use companion object's getInstance() function to get the instance of the implementation of BaseApiManager.
  4. For setting up the services, call createService(username: String, password: String, baseUrl: String, tenant: String) method of BaseApiManager providing valid credentials.
  5. Currently only the selected number of APIs are exposed, as much required in android-client.

Building the Code

  1. Clone the repository using command: git clone https://github.com/openMF/mifos-android-sdk-arch.git
  2. Open Android Studio.
  3. Click on 'Open an existing Android Studio project'
  4. Browse to the directory where you cloned the android-client repo and click OK.
  5. Let Android Studio import the project.
  6. Build the application in your device by clicking run button.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. In case of multiple commits squash them. You can find guide here: how to squash commits
  5. Clear the checks and make sure build is successfull
  6. Push your branch (git push origin my-new-feature)
  7. Create a new Pull Request, following the template

About

This is architecture repository for mifos-android-sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%