Contacts app represents a real world app example: it provides a fairly complex set of functionalities, it's a suitable showcase for all the advantages that architecture components bring, has all features that would make it a modular, scalable, testable and maintainable app.
- The app displays the list of user’s contacts that are saved in
Room
local database. - If there's no data in
Room
, it will be retrieved from contactsContentPorvider
and saved locally inRoom
. - The local contacts are synchronized with
ContentPorvider
in background every 15 minutes usingWorkManager
. - The local contacts are synchronized every time the user opens the app.
The app is divided into 3 modules under common
package. Each package has its own responsibilities.
Core module contains all shared classes that are visible to all modules. Here we put all the code that we need to share with any module in the app.
Data module contains any classes related to the data in the app. It contains network, local database, SharedPreferences, model classes, and any data-related classes.
Presentation modules contains all UI classes including view models, base activities, base fragments, custom views, and other common views.
The app implements Google architecture components. Visit the Guide for the details.
You can find tests in app
and `data' modules.
Each module has its own README.md
file that documents the module responsibilities.
Click to reveal License
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.