CLEAN-3: The framework and devices layer should include the entirety of the app components which depend on Android.


Description

In accordance to the clean architecture principles, all components related to the framework should be grouped in the outer architectural layer. This includes all components which contain Android specific implementations, which should not be present in the business logic layers. Examples include, in addition to the user interface model, the data persistence module (e.g., LiveData, DAOs, ORMs, Shared Preferences, Retrofit, etc.) and eventual dependency injection frameworks.

Example

We created a simple MVP login Application.

MVP depicted

As you can see all the activities are in the View Layer. This device layer contains everything related to the Android Framework.

These are also the only files that contain onCreate from the Android Framework. Because this method is called whenever an Activity is created.

Check out the Github page to view the complete repository.