All Projects → jshvarts → Offlinesampleapp

jshvarts / Offlinesampleapp

Licence: apache-2.0
Sample Offline-First MVVM app that uses Android Priority Job Queue, Room, Retrofit2, LiveData, LifecycleObserver, RxJava2, Dagger Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Offlinesampleapp

Android Clean Architecture Mvvm Dagger Rx
Implemented by Clean Architecture, Dagger2, MVVM, LiveData, RX, Retrofit2, Room, Anko
Stars: ✭ 138 (-78.87%)
Mutual labels:  rxandroid, mvvm, clean-architecture, mvvm-architecture, room, retrofit2, livedata
News Sample App
A sample news app which demonstrates clean architecture and best practices for developing android app
Stars: ✭ 334 (-48.85%)
Mutual labels:  rxjava2, clean-architecture, mvvm-architecture, room, retrofit2, livedata
movies
An example approach for modularization, reactive clean architecture and persistancy.
Stars: ✭ 110 (-83.15%)
Mutual labels:  room, reactive-programming, clean-architecture, rxandroid, retrofit2, livedata
MockAppMVVM
A sample app structure using the MVVM architecture using Retrofit, Dagger2, LiveData, RxJava, ViewModel and Room.
Stars: ✭ 14 (-97.86%)
Mutual labels:  room, rxjava2, retrofit2, mvvm-architecture, livedata
Base Mvvm
App built to showcase basic Android View components like ViewPager, RecyclerView(homogeneous and heterogeneous items), NavigationDrawer, Animated Vector Drawables, Collapsing Toolbar Layout etc. housed in a MVVM architecture
Stars: ✭ 18 (-97.24%)
Mutual labels:  rxjava2, mvvm, room, retrofit2, livedata
Mvvmframe
🏰 MVVMFrame for Android 是一个基于Google官方推出的Architecture Components dependencies(现在叫JetPack){ Lifecycle,LiveData,ViewModel,Room } 构建的快速开发框架。有了MVVMFrame的加持,从此构建一个MVVM模式的项目变得快捷简单。
Stars: ✭ 218 (-66.62%)
Mutual labels:  mvvm, mvvm-architecture, room, retrofit2, livedata
Business Search App Java
Showcases object oriented programming in Java, Java Swing, Kotlin, and Android
Stars: ✭ 53 (-91.88%)
Mutual labels:  rxjava2, mvvm, clean-architecture, retrofit2, butterknife
Mvvmsmart
基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合ViewModel+Lifecycles+Navigation+DataBinding+LiveData+Okhttp+Retrofit+RxJava+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发高质量、易维护的Android应用。 项目组会持续维护,请放心使用.欢迎Start并Fork交流.
Stars: ✭ 382 (-41.5%)
Mutual labels:  rxjava2, mvvm, room, retrofit2, livedata
Mvvm Architecture Android Beginners
This repository contains a sample app that implements MVVM architecture using Kotlin, ViewModel, LiveData, and etc.
Stars: ✭ 176 (-73.05%)
Mutual labels:  rxjava2, rxandroid, mvvm, mvvm-architecture, livedata
Android-Starter-Kit
This is up-to-date android studio project for native android application, that is using modern tools and libraries.
Stars: ✭ 16 (-97.55%)
Mutual labels:  clean-architecture, rxandroid, butterknife, rxjava2, retrofit2
Kotlin Android Mvvm Starter
Android Kotlin Starter is a starter project which implements MVVM Pattern.
Stars: ✭ 276 (-57.73%)
Mutual labels:  rxjava2, rxandroid, mvvm, mvvm-architecture, retrofit2
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (-91.58%)
Mutual labels:  rxjava2, mvvm, clean-architecture, room, livedata
Clean-MVVM-NewsApp
Android News app developed using Clean + MVVM architecture
Stars: ✭ 52 (-92.04%)
Mutual labels:  clean-architecture, rxjava2, retrofit2, mvvm-architecture, livedata
Mvvmarms
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
Stars: ✭ 425 (-34.92%)
Mutual labels:  rxjava2, mvvm, room, retrofit2, livedata
Android-Mvi-Starter
Android MVI Starter application
Stars: ✭ 19 (-97.09%)
Mutual labels:  rxandroid, rxjava2, retrofit2, livedata
Cloudreader
🗡️ 云阅:一款基于网易云音乐UI,使用玩Android Api,Retrofit2 + RxJava2 + Room + MVVM-databinding架构开发的Android客户端
Stars: ✭ 4,611 (+606.13%)
Mutual labels:  rxjava2, mvvm, room, retrofit2
Moviehub
Showcases popular movies, tv shows, and people from The Movie Database
Stars: ✭ 325 (-50.23%)
Mutual labels:  rxjava2, rxandroid, retrofit2, butterknife
Jetpack-Compose-MVI-Demo
Demo / Sample Android Project created with Jetpack Compose and MVI Architecture Pattern
Stars: ✭ 114 (-82.54%)
Mutual labels:  room, rxandroid, retrofit2, livedata
Viabus Architecture
让 Android 开发可以像流水线一样高效的,职责分离架构 ⚡ 不同于 MVP 的配置解耦,也不能和 似是而非 的 MVVM - Clean 同日而语。VIABUS 是世界范围内首个明确提出,通过职责分离,来真正实现 UI 和 业务并行开发的 Android 项目级开发架构和设计模式理念。
Stars: ✭ 485 (-25.73%)
Mutual labels:  reactive-programming, mvvm, clean-architecture, room
Weather-Guru-MVP
Sample Material-design Android weather application build with MVP architectural approach using Dagger2, RxJava2, Retrofit2, Event-Bus, GreenDao, Butterknife, Lottie etc.
Stars: ✭ 15 (-97.7%)
Mutual labels:  rxandroid, butterknife, rxjava2, retrofit2

Offline Sample App

Build Status Android Weekly

Medium post covering this app: Building Offline-First App using MVVM, RxJava, Room and Priority Job Queue

What is an Offline App?

Offline App (or Offline-First App) enables user to seamlessly interact with it by using local device storage and then synchronizing the data with some remote storage (cloud database, etc) later via a background process.

With offline apps

  1. users no longer get error messages due to network connection problems.
  2. users benefit from faster loading times and conserving battery life.
  3. users do not see any loading bar since their actions are performed against fast local storage.

App Overview

Comments Screen

This app is a working sample that showcases one way of implementing offline commenting capability on Android platform. Users' comments are stored in local Room database first. Then a background job is spawned to synchronize local data with remote database if and when Internet connection is available.

This background job is designed to be persistent--it is guaranteed to execute even after app or device restarts while waiting for the network connection.

Libraries Used

  • Patterns and frameworks
    • MVVM (Model-View-ViewModel) using Google's new Architecture components ViewModel, LiveData, LifecycleObserver, etc.
    • Clean Architecture with ViewModel interacting with UseCases and the latter interacting with local database. Making each layer highly testable.
  • Database
  • Background Job processing
  • Remote Call APIs
  • Dependency Injection
  • Communication between app layers
    • RxJava2 and RxAndroid for interacting between ViewModel and local database.
    • RxRelay for publishing requests from the background job so that lifecycle observer components can update local database.
  • Other
    • ButterKnife to simplify View and Listener bindings.
    • Travis CI is used for automating continuous integration.
    • The following quality checks are configured: checkstyle, pmd, findbugs, lint and RxLint. You can perform all of them at once by executing ./gradlew check

Branches

  • master - comment sync response is observed and local database is updated by LifecycleObserver. For this to work, the app has to be in foreground.
  • sync-in-background - comment sync response is observed and local database is updated by the background thread whenever connection is available. For this to work, the app does not need to be in foreground.

License

Copyright 2017 James Shvarts

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