All Projects → jordifierro → Android Base

jordifierro / Android Base

Android Clean Architecture MVP RESTful client template app

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Base

Android-Starter-Kit
This is up-to-date android studio project for native android application, that is using modern tools and libraries.
Stars: ✭ 16 (-81.61%)
Mutual labels:  mvp, clean-architecture, dagger2, rxjava2
CleanArchitecture-SocketIO
CleanArchitecture with SocketIo 📡
Stars: ✭ 32 (-63.22%)
Mutual labels:  mvp, clean-architecture, dagger2, rxjava2
Movieguide
Movie discovery app showcasing MVP, RxJava, Dagger 2 and Clean Architecture
Stars: ✭ 2,573 (+2857.47%)
Mutual labels:  dagger2, mvp, clean-architecture, clean-code
GithubApp-android-architecture
Let's learn a deep look at the Android architecture
Stars: ✭ 16 (-81.61%)
Mutual labels:  mvp, clean-architecture, dagger2, rxjava2
Ribble
Simple Dribbble Client using Dribbble API, fully written in Kotlin 😱 ❤️
Stars: ✭ 872 (+902.3%)
Mutual labels:  rxjava2, dagger2, mvp, clean-architecture
Bigbang
Android base project used by Xmartlabs team
Stars: ✭ 47 (-45.98%)
Mutual labels:  rxjava2, dagger2, mvp, boilerplate
Business Search App Java
Showcases object oriented programming in Java, Java Swing, Kotlin, and Android
Stars: ✭ 53 (-39.08%)
Mutual labels:  rxjava2, dagger2, mvp, clean-architecture
idreminder
Simple reminder app build with Kotlin + Clean Architecture + RxJava + Dagger2 + MVP + Room
Stars: ✭ 29 (-66.67%)
Mutual labels:  mvp, clean-architecture, dagger2, rxjava2
UTair-MVP-Sample
Android Clean Architecture + MVP Sample written in Kotlin
Stars: ✭ 27 (-68.97%)
Mutual labels:  mvp, clean-architecture, dagger2, rxjava2
Crazydaily
[开源项目] 一款程序员日常放松的App,基于Material Design + MVP-Clean + Weex + Flutter + RxJava2 + Retrofit + Dagger2 + Glide + Okhttp + MTRVA + BRVAH + 炫酷控件 + 炫酷动画
Stars: ✭ 294 (+237.93%)
Mutual labels:  rxjava2, dagger2, mvp, clean-architecture
Android Mvp Architecture
MVP + Kotlin + Retrofit2 + Dagger2 + Coroutines + Anko + Kotlin-Android-Extensions + RX-java + Mockk + Espresso + Junit5
Stars: ✭ 82 (-5.75%)
Mutual labels:  dagger2, mvp, clean-architecture, clean-code
Android Mvp Architecture
This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava2, FastAndroidNetworking and PlaceholderView
Stars: ✭ 4,360 (+4911.49%)
Mutual labels:  rxjava2, dagger2, mvp
Theatre
Pet project using Clean Architecture + MVVM + Reactive Extensions + Android Architecture Components. The data are fetched from LondonTheatreDirect API. 🎭
Stars: ✭ 577 (+563.22%)
Mutual labels:  rxjava2, dagger2, clean-architecture
Android Kotlin Mvp Architecture
This repository contains a detailed sample app that implements MVP architecture in Kotlin using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
Stars: ✭ 615 (+606.9%)
Mutual labels:  rxjava2, dagger2, mvp
Aiyagirl
🔥 爱吖妹纸(含 Kotlin 分支版本)——Retrofit + RxJava + MVP 架构 APP 体验代码家的干货集中营 Gank.io,福利多多,不容错过
Stars: ✭ 1,109 (+1174.71%)
Mutual labels:  rxjava2, dagger2, mvp
Android Dagger2 Example
This project implements the dagger 2 in android for dependency injection
Stars: ✭ 453 (+420.69%)
Mutual labels:  dagger2, mvp, clean-code
Kotlin Android Scaffolding
An android project structure using kotlin and most common libraries.
Stars: ✭ 53 (-39.08%)
Mutual labels:  rxjava2, dagger2, clean-architecture
Aspnet Core Clean Arch
It is a clean architecture project template which is based on hexagonal-architecture principles built with .Net core.
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture, clean-code, tdd
Movienight
MovieNight is a sample Android application that uses the clean architecture approach and is written in Kotlin.
Stars: ✭ 744 (+755.17%)
Mutual labels:  rxjava2, dagger2, clean-architecture
Bilisoleil
An unofficial bilibili client for android --rxjava2+mvp+okhttp3+retrofit2+dagger2
Stars: ✭ 430 (+394.25%)
Mutual labels:  rxjava2, dagger2, mvp

Android Base

Build Status

Introduction

This projects aims to be:

  • A mobile client app example to discuss about native Android setup and development.
  • A basic template to start projects from it.

Specification summary:

  • 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.

Here is its counterpart server api from where this app consumes the data -> rails-api-base

Quick start

  • Install your favourite IDE or just the Android sdk (buildTools 23.0.2 and compileSdk 23, or define your own versions in the dependencies.gradle). I use Android Studio.

  • Clone the repository and get inside it:

git clone git://github.com/jordifierro/android-base.git --origin android-base YourProjectName
cd YourProjectName
  • Remove all 'note' related code (optional):
./bin/remove_notes
  • Rename the project and package name:
./bin/rename_project YourProjectName your.package.name
  • Connect a device (or start the emulator) and run the tests:
./gradlew clean build cAT
  • Once the build is successful, create a new remote repository and then execute this to reset the repo and push it:
./bin/reset_git https://github.com/yourusername/YourProjectName.git

That's it, you can now start developing your own app!

Note: To run the app (you can run only the tests now) remember to setup an api server (rails-api-base is already developed to serve this app, but you can also make your own) and configure the RestApi to connect to it (simply modify RestApi.java params).

Documentation

The application itself is almost empty, it only aims to provide some basic modules, implement the structures with some patterns and give sample code. Here are the specifications:

App boilerplate

The main goal of this application is to avoid writing app basic boilerplate code, so the following functionalities are already implemented:

  • User login
  • User register
  • User password recovery
  • Settings screen with logout, delete account and information links
  • Terms and conditions screen
  • Privacy policy screen
  • Session persistence
  • Navigation
  • RESTful client
  • App architecture skeleton
  • Multiple testing examples

This can be used from now, and it also provides a structured way to add more code.

Notes Example Code

To provide more sample code, it has been developed code to manage notes (like handwritten paper notes representation), composed by a title and a content. Thus, the app has notes index, detail, create and edit screens.

Its unique purpose is to be a sample code, so it will be deleted when you run ./bin/remove_notes script.

MVP Clean Architecture

The code has been structured following the Clean Architecture approach and the model-view-presenter (MVP) pattern. Check this and this posts, and also this project, for more information about it.

Dependency Inversion Principle

Dependency Inversion Principle is used on the app basically to make testing easier and make the components decoupled and reusable. It also reduces boilerplate code and helps with the management of the instance scopes. The library used to achieve that is Dagger 2. Butterknife is used for view injection.

Reactive Programming

Clean architecture makes you create different layers and, in order to avoid a callback hell, reactive programming paradigm is applied using ReactiveX library.

RESTful client with version, language and authentication

As a client app, its main goal is to let the user interact with data from a server api. The project shows how to deal with that easily. Retrofit library is used to implement the api call methods. Authentication, api version and internationalization are included to the requests.

Full unit testing coverage

One of the most interesting things of this project is that it has full unit testing coverage, from data modules to android views, including all intermediate layers. That is the result of the usage of clean architecture, dependency inversion and good testing practices. One example of that is the view testing, where the view presenter is mocked by mockito and injected by testing dagger component, provided by a custom junit runner.

Here you can find tutorials that explain some of this tests:

Patterns and good practices

Another patterns and good practices are used in the project such as implement activities and fragments common behavior with inheritance, use fragments and define the navigation in the activities to make screen remodeling painless, use interfaces to decouple components... Android specific good practices like string internationalization, usage of style sheet and other little methodologies are followed too. Here one of the used resources -> android best practices.

Continuous Integration System

Build Status

Travis-CI has been added as a continous integration system to run all the test on each push (both java and android tests).

To run the tests locally, simply connect a device or run the emulator and execute:

./gradlew clean build cAT

That will run both java and Android tests.

Scripts to reset project

There are some scripts under /bin folder to make really easy start a new project from scratch using this template. Just follow the 'Quick start' section placed above.

All shell scripts are verified by ShellCheck tool.

Todo List

  • [ ] Add sample integration testing.

Here is its counterpart server api from where this app consumes the data -> rails-api-base.

Contribute

All suggestions and contributions are more than welcome!

  • Fork this repo.
  • Create your feature branch (git checkout -b feature-name).
  • Develop your feature and test it.
  • Run tests successfully:
./gradlew clean build cAT
  • Commit your changes (git commit -m 'Implement new function').
  • Push the changes (git push origin feature-name).
  • Create a pull request and I'll merge it with the project.

Contributors

Unfortunately, there are no contributors yet.


http://jordifierro.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].