I’m glad to present you my new project: android-base
This post is just a brief summary, but here are more posts about this project, specifically about testing:
Android Base is a mobile Android application template where you can manage notes (like pencil annotations) and users with authentication. The content is just to have something to code and the goal isn’t make a useful app but to create a structure for future projects, and learn during the process too.
This application is a RESTful mobile client and consumes its data from its partner project, rails-api-base. While using different technologies, platforms and RESTful roles (one serves and the other consumes), the projects share origins, goals and philosophy. That aspects are already described here so I’ll ignore them on this post and focus on the particularities.
Unlike with the Rails app, I was experienced with Android when I started this project. Still, I decided to take this opportunity to push my Android skills to the next level. So I’ve decided do it as well as possible.
I did a previous research about the new available methodologies and libraries and I decided to apply the Clean Architecture with the model-view-presenter pattern. I also learnt how to implement Dependency Injection on Android and apply the Reactive Programming paradigm. Last but not least, I’ve reached my main goal: make unit testing painless and reach full testing coverage on an Android project.
For more information go to the github repository of the project. Here I leave you a list the most outstanding points you’ll find there explained in detail:
- App boilerplate (users, settings, info…)
- Notes app example.
- MVP Clean Architecture.
- Dependency Inversion (Dagger 2 and Butterknife).
- Reactive Programming (RxJava and RxAndroid).
- RESTful client with version, language and authentication (Retrofit).
- Full unit testing coverage (Espresso, Mockito and Dagger 2).
- Other patterns and good practices.
- Continuous Integration system.
- Scripts to reset project.
If you have any doubts or suggestions don’t hesitate to leave a comment. I’m looking for contributors too ;) Feel free to use the code for your own purposes!