Apache GSoC’ 2017 Blog Post

Finally It’s time to wrap up and finalise the project to submit on GSoC dashboard. Here is my GSoC project Fineract-CN-mobile. It was great summer to work with My mentors Markus Geiss and Mark van Veen.

First I want to thanks both of them. It wasn’t possible without you.

Thanks Markus and Mark

It was normal for me to start new project from scratch but this time I had no idea what will be scope of the project, what will be the complexity of project but thanks to Ishan Khanna, My last summer GSoC mentor who taught me how to write decoupled code in architectural manner.

Let’s talk about how I achieved my goals.

#Initial Commit

Every good android project start with Hello World. My first commit was Hello WorldInitial commit. My first step to achieve higher gaols, It was great achievement finally I started the project to make myself proud😜.

#Deciding Project Architecture

Now It was time to decide about architecture. This is the most important decision. Whenever you are starting any project and you don’t know, what will be the future of the project, how far it will go. that means It is the most important thing and please don’t be in hurry to just start the project, thinking that you will manage later in future. Lol believe me you are increasing your development time at least twice or may be more.

I will suggestion, keep calm and think about it. Give it at least a week.

  1. what are the scopes of the project.
  2. How far It will go.
  3. What will be features of the project.
  4. Which type of developers gonna work on the projects.
  5. who will be maintainer of the project after you.

These are some points that you should always think about them.

Here are some good architectures that I look always before starting new project.

These are just basic architecture that can help you regarding decision.

Last year I redesigned the Mifos android-client and implemented the MVP architecture. During GSoC I learned a lot, how important architecture is.

After completing my research on Ribot and Google architecture. I decided to make my own architecture according to my need and I pick up the all goods from Ribot and Google and started writing project.

Finally I initialised the project with good architecture : https://github.com/openMF/Fineract-CN-mobile/tree/3c3d52ddadc8039624ecd563b494bee3771167ee

#First Feature Login

Now It was the time to deal with Fineract-CN REST API. You can find the API code here: https://github.com/mifosio.

As I was implementing the login feature with cool architecture and great libraries like Retrofit2, Rxjava2, Dagger2, Okhttp3 etc. I manage to make mockups first then implementing.

Here you can find mockups: https://github.com/openMF/Mifos-Mockups.

This was the first feature implementation that I did.

#Refresh Access Token globally

Fineract-CN have OAuth2 login. It means after some time access token going to expire then I have to refresh the access token. It was challenging for me. I did research but did not found anything that So I don’t have to write any logic so I don’t have to manage access token. I did not find anythings that completes my requirements. So I decided to write my own logic.

I have written my own logic that handle everything regarding the access token Here

So Basically I have written a logic in Rxjava that handles everything like whenever user make any request to server It check what is the status code and proceed accordingly. If access token in 403(In my case It gives 403, we are in development phase) then it refresh the access token and make the previous request again. This logic handle everything. I have enhance the logic and It’s now very powerful and handle everything.

#Feature Customer List

In this feature I have to show customer list and it’s status with material design UI. I already learnt that if I have to decrease my development time. I should need to make the mockups first, that’s why I first make mockups of the screen and then implement.

This is the final customer list feature.

#Feature Customer Detail

This is one of the feature in which I had given lot’s of effort. First look the mockups and It is implemented same as it is looking in mockups.

This feature follow the material design guidelines.

#Feature Create Customer

Create new customer is a very good feature. When I was started working in this feature. I knew that it should be easy to understand and should show every bit of knowledge for creating new customer.

In this feature user will fill the form one by one and can submit at the last that will create the customer on the server. As user will come back to customer list that customer will be visible there.

#Edit Customer Detail

Sometime we create a customer and after sometime customer come back to field officer and says,

Sir, I shifted to new location, I need to update my contact details.

In this case we have to edit the customer details and submit again the latest details. So in future field officer can easily track the customer.

Keeping in mind this scenario, I have add a feature that allow field offer to update the customer details.

#Feature Loan Account

Now we have customer profile ready. We need to create loan account So Bank can give loan to the customer. So I created feature Loan accounts. In which field officer can view customer loan account and If there is no loan account then It show an empty UI

No Loan account Found, Tap to add loan account.

As field officer will click on FloatingActionButton It will bring a form to create new loan account.

#Feature Create New Loan Account

To access this feature field officer need to click on FloatingActionButton in loan accounts list that will bring the form. Field officer need to fill the form and as field officer will submit the form It will be create on server and It can be accessible from loan list.

#Feature Deposit Accounts

This feature consist deposit accounts. If there will be no deposit account then It will show an UI with message.

No Deposit account Found, Tap to add Deposit account.

#Feature Create New Deposit Account

In this feature, Field officer can create new deposit account for customer, for creating new deposit account, field officer need to click on FloatingActionButton that will bring the new deposit account form and next fill the form and submit.

#Deposit Account Details

In this feature user can view the deposit account details.

#Feature Create New Identification Cards

This is the feature in which field officer can create new identification card and view their details, upload and view identification attachments.

Let’s see first how am I implemented the create new identification card.

Here you can see, In first step field officer will enter the details of identification and in next step overview of the entered details. As field officer will be satisfied in overview, field officer can create new identification by clicking on complete button.

#Feature Identification Card List

Now field officer can create the identification card. It’s time to see them in list. Initially If there will be no identification It will show

No Identification cards Found, Tap to add Identification card.

As the field officer will click on the FabActionButton. It will bring a form to create new identification card.

#Feature Identification Card Detail

It’s time to upload identification card attachments before that let’s see the how I develop the identification detail feature

In Identification card detail feature, There are many actionable things like

  1. You can view the detail of the Identification card.
  2. You can delete the identification card.
  3. You can edit the identification card.
  4. You can delete identification card scans(Attachments).

#Feature Upload Identification Card Scan (Attachments)

In this feature field officer can upload identification card scan to the server. So customer can be verified later. customer can be trackable and make sure customer is valid, as field officer click on the FabActionButton It bring the BottomSheet to fill the details of the scan and click the image of the scan and finally upload to server.

#Feature Customer Task (Change the status of customer)

As Field officer create new customer. It can have many status like

  1. Pending
  2. Active
  3. Lock
  4. Close

So, using this feature can activate, lock, unlock, close the customer as you can see after clicking on the Tasks option from the customer details. It will bring the option according to current status and field officer can make such actions then.

#Feature Activities List

This feature contains the all logs of change of customer status.

#Feature Upload Customer Profile Picture

In this feature field officer can upload the customer profile picture using

  1. Camera
  2. Gallery

And If field officer want to delete the current picture. officer can do it by selecting delete option from list.

#HappyGSoCCoding #GreatLearning #AwesomeExperience #AwesomeMentors #MakingNewThings #CodingWithMVP #MakingAwesomeThings #RxJavaRocks

Once again it was really great experience. I learnt many new things and thanks to mentors again. It was awesome Google Summer of Code 2017.

Thanks for reading.

Lead Android Engineer at https://mikashboks.com/, Open source contributor at Mifos Initiative and mentoring GSoC Students. @GitHub: https://github.com/thera