Skip to content

Android app for checking posts and comments 💬. Performs API calls, paging for seamless data loading, and local caching for essential information.

Notifications You must be signed in to change notification settings

JorgeDiazz/PostsApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview: PostsApp (Android app)

Welcome to TheMovie, an Android application that utilizes the JSONPlaceholder Database to retrieve posts and their comments, providing a social media app-like experience.

What's included

An Android app with modular architecture and MVVM architectural pattern.

app_architectural_pattern

Furthermore, some libraries and frameworks such as:

  • Splash screen api and container HomeActivity.
  • Network connectivity interceptor for HTTP requests.
  • Hilt for dependencies injection.
  • Room for local storage.
  • Retrofit2 for API requests.
  • Paging3 for local & remote data pagination.
  • RemoteMediator for pagination orchestration.
  • Coroutines and Flow for Reactive Functional Programming.
  • StateFlow and SharedFlow for observing and updating data.
  • ViewBinding for activities and fragments.
  • Timber for logging purposes.
  • Android Studio EditorConfig file to maintain consistent coding styles.
  • Gradle’s Kotlin DSL.
  • SonarCloud for static code analysis.
  • SonarQube configuration files.
  • JaCoCo maven plugin to generate test coverage reports.
  • ktlint for static code analysis.
  • LeakCanary for memory leaks detection.
  • dokka for Kotlin's documentation generation.

To summarize, every technology mentioned above was included in this project in order to meet the following requirements:

  1. Load posts from JSON API, using both _start and _limit query parameters to support pagination (e.g. jsonplaceholder.typicode.com/posts?_start=0&_limit=10).
  2. Show up swipe-to-options feature in posts recycler view items, allowing both delete a post and mark a post as favorite.
  3. Favorite posts are shown up at the top of the list.
  4. When a favorite post is unmarked as favorite, it returns to its previous position in the list.
  5. Favorite posts have a star indicator.
  6. Delete all posts in posts list except from the favorite ones using a floating button.
  7. Fetching posts from JSON API when pull-to-refresh.
  8. Post details screen is opened up when a post is tapped.
  9. Delete a post and mark a post as favorite in post details screen.
  10. Show up post, author, and comments data in post details screen.
  11. App is able to work offline, loading both posts lists and posts details from local database.
  12. Supporting landscape mode without losing screens' state.

Installation

Clone this repository and import it into Android Studio

git clone https://github.com/JorgeDiazz/android-zemoga-tech-test.git  

Build variants

Herein you can find multiple targets that the app takes into account:

Staging Production
Internal Debug Debug
External Release Release

Where the following formed variants are built for staging purposes:

  • stagingInternalDebug
  • stagingInternalRelease

And these ones for production purposes:

  • productionInternalDebug
  • productionInternalRelease
  • productionExternalDebug
  • productionExternalRelease

Debug app signing

In order to sign your debug app build using debug-keystore.jks keystore, these are the credentials you will have to take in mind:

STORE_FILE = ./app/debug-keystore.jks

STORE_PASSWORD = android

KEY_ALIAS = android_zemoga

KEY_PASSWORD = android

Others

  1. Project's CodeStyle can be found here.
  2. Project utilities file can be found here.

Using the app

Launching the app

Marking posts as favorite

Unmarking posts as favorite

Deleting posts

Post details screen

Marking posts as favorite in post details screen

Deleting favorite post in post details screen

Delete & refresh all non-favorite posts

About

Android app for checking posts and comments 💬. Performs API calls, paging for seamless data loading, and local caching for essential information.

Topics

Resources

Stars

Watchers

Forks

Languages