This is a Bolierplate Android app. It is using the MVP (Model-View-Presenter) pattern (but not for long!)
#This implementation has the following features:
- Presenters survive configuration change of the View. A new Presenter is created when a screen is first created, and destroyed when screen is destroyed. It persists across config changes.
- Presenters keep state. When a View gets recreated upon configuration change it inherits the presenter from the previous View. Presenter updates View state to that of the previously existing View. For example, if a View sends an async request, and a new View is created, the request is not re-sent. The new View gets the callback when the async request returns. If the async request has returned in one view, and new view is created, new view gets the data delivered to it immediately
- Presenters are injected into Views using Dagger 2. That makes it easy to inject mock Presenters into Views, and mock dependencies into Presenters.
- Code is fully tested and comes with a test suite setup. Presenters are tested using plain jUnit tests. Views are tested using Espresso and jUnit.
Add your Fabric keys to app/fabric.properties. They are necessary to log to Crashlytics in Prod build.
- Dagger 2 dependency injection
- ButterKnife view injection
- Timber logging
- LeakCanary memory leak detector
- ConstraintLayout
- RxJava
- jUnit 4.12
- Mockito 2 mocking
- AssertJ Java assertions
- AssertJ Android View assertions
Project has two Build Variants - Release and Debug
in no particular order
- Convert to Kotlin
- Convert to MVVM
- Integrate View Binding with a View Model for setting data on View
- Add Composition pattern to Activity
- Add images and deploy project to Google Play
- Add auto-deployment configuration, possibly via Fastlane
- Set up project generation utility
- Add Checkstyle plugin
- Add SonarQube integration
- Add CI project configuration via TravisCI or CircleCI
- Retrieve and display a list, to figure out integration with lists/ adapters
- Enable caching in Repository. Retrieve from Network, populate memory cache
- Enable local DB caching, probably via Realm DB.
- Add Espresso integration testing
- Add automated performance testing - start time, screen load time, APK size, method count
- Example of a multi-module Component and its use (Component that uses multiple Modules - and creating test version of it)
- Example of functionality composition. Reusable presenter components? multiple sections per screen - multiple fragments?
- Master / detail flow implementation. Fragments as Views instead of Activities
- Integrate third party SDK, e.g. Branch. Presenter integration via shim?
- Signup / login flow example. Possibly using Firebase Authentication?
- Error handling of network / user errors
- Handle 'don't have network' state (airplane mode / network off / network not connected)
- Rx network call with exponential backoff
Copyright 2016 Orange Penguin, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.