A mobile app for displaying realtime nearby places around you using Foursquare API
This app also showcases following the Android Architecture Components working together: Room, ViewModels, LiveData.
Walkthrough | Places list | Empty view | No connection |
---|---|---|---|
App has two operational modes, “Realtime" and “Single Update”. “Realtime” allows app to always display to the user the current near by places based on his location, data should be seamlessly updated if user moved by 500 m from the location of last retrieved pl aces. “Single update” mode means the app is updated once in app is launched and doesn’t update again User should be able to switch between the two modes, default mode is “Realtime”. App should remember user choices for next launches
The app uses a Model-View-ViewModel (MVVM) architecture for the presentation layer. Every screen corresponds to a MVVM View. The View and ViewModel communicate using LiveData.
In the view model RxJava is used to handle the network request and map the response to a sutable representation that could be handled by the ui.
When the network response succeed it writes to a Room database, which exposes a LiveData connection to the view which means the app is offline ready. The bases of this architecture is https://github.com/android/architecture-components-samples
- Retrofit Type-safe HTTP client for Android and Java by Square.
- Architecture Components help me design robust, testable, and maintainable apps..
- BaseRecyclerViewAdapterHelper for making RecyclerViews as simple as possible.
- PermissionsDispatcher Simple annotation-based API to handle runtime permissions.
- play-services-location facilitate adding location awareness to the app with automated location tracking.
- RxJava responsible for coordinating the reload button animation and updating the text on main screen cards periodically.
- ReactiveNetwork For listening network to connection state.
- KotlinAndroidUtils Common utitlies used in all of my apps.
- NetworkErrorView A custom view for displaying a network error view with beautiful and simple animation.
Issues and Pull Requests are welcome. You can report here.
Copyright 2020 humazed.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.