This is architecture repository for mifos-android-sdk
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.
-
Extend
UserPreferences<USER>
andBasePreferenceManager
classes for handling the preferences tasks. -
The returned data can be easily casted as per client need using
EntityMapper
andAbstractMapper
-
Single point of interaction for all the api services using BaseApiManager.
-
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) } }
To add library in your gradle project follow the steps below:
- Add this in your root
build.gradle
at the end of repositories:allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
- Add the dependency
dependencies { def sdk_Version = '1.0.2' implementation "com.github.openMF:mifos-android-sdk-arch:$sdk_Version" }
- The core module in the SDK contains all the API requests written.
- The entry point to the library is the BaseApiManager.
- Use companion object's
getInstance()
function to get the instance of the implementation ofBaseApiManager
. - For setting up the services, call
createService(username: String, password: String, baseUrl: String, tenant: String)
method ofBaseApiManager
providing valid credentials. - Currently only the selected number of APIs are exposed, as much required in android-client.
- Clone the repository using command:
git clone https://github.com/openMF/mifos-android-sdk-arch.git
- Open Android Studio.
- Click on 'Open an existing Android Studio project'
- Browse to the directory where you cloned the android-client repo and click OK.
- Let Android Studio import the project.
- Build the application in your device by clicking run button.
- Fork it
- Create your feature branch
(git checkout -b my-new-feature)
- Commit your changes
(git commit -m 'Add some feature')
- In case of multiple commits squash them. You can find guide here: how to squash commits
- Clear the checks and make sure build is successfull
- Push your branch
(git push origin my-new-feature)
- Create a new Pull Request, following the template