Redux Android Sample


Source link: https://github.com/Catbag/redux-android-sample

redux-android-sample

An Android sample that implements Redux architecture (using Fluxxan and Anvil) and NoSQL (using SnappyDB)

Architecture

#App State Example

{

  hasMoreGifs: true,
  gifs: [{

path: "path",

url: "url",

title: "string",

watched: false,

status: PAUSED //PAUSED, LOOPING, DOWNLOADING, DOWNLOADED, NOT_DOWNLOADED, DOWNLOAD_FAILED
  
}
] 
}

#Tests

###Integration tests

  • The integration tests are running on top of espresso framework, and using mockito to handle mocks.

To setup a CI or run tests in command line use this command:

adb shell am instrument -w br.com.catbag.gifreduxsample.test/android.support.test.runner.AndroidJUnitRunner 

###Unit tests

  • The unit tests are running with roboeletric, that is a android test framework with builtin mock capabilities of android sdk. The roboeletric give us the power to run some unit tests with functions from android SDK without the requirement of an emulator running, what results in very fast tests.

To run unit tests through a CI or command line:

./gradlew  clean test --daemon --continue 

Drone CI

Running drone build locally

  • Install drone CLI

      curl http://downloads.drone.io/drone-cli/drone_linux_amd64.tar.gz | tar zx  sudo install -t /usr/local/bin drone 
  • Run drone build inside project dir

      drone exec --trusted 

CI last build reports

#Good Practices

###Actions Creators

  • Pay attention on action creation UI calls that do something async and dispatch action, the main action has to be dispatched before other async created actions, and its not a good practice dispatch two actions on the same synchronous cycle.

CODE INSPECT

How to use

  1. Run check task on Gradle Tasks -> verification

  2. After this attention on Android Studio Run console or on gradle output if you run on terminal.

  3. The reports are inside app/build/reports/tool_name folders. eg. flux-android-sample/app/build/reports/lint

  4. The inspect tools custom configurations are inside app/inspect/ folder.

  5. Problems found by inspect tools stops the check task.

References

Summary

Checkstyle

FindBugs

PMD

Android Lint

Resources

Maoni is a lightweight open-source library for integrating a way to collect user feedbacks from within Android Applications.

Custom calendar for Android.

This project allows to create a button that is growing up and down.

Recycler-Core provides a clean MVC framework for managing your RecyclerView Adapters.

A library that allows you to use a CursorAdapter as the underlying data source for a RecyclerView.Adapter so that it can be used with a CursorLoader as was previously possible using the ListView.

An implementation of the "Bottom Navigation" component from Google Material Design spec.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes