base_app_android


Source link: https://github.com/RefineriaWeb/base_app_android

Base App Android

Base skeleton structure to start every new project, based on the design patters suggested by Robert C. Martin (aka Uncle Bob) on his clean architecture.

base_app_android is the project which we use at Refineria Web to start any new Android project. It presents a structure of 3 layers, domain, data and presentation; this approach has been chosen with the purpose of creating an application that conducts unit testing and also allow the portability between platforms, mainly iOS.

The project is divided in three modules:

  • domain: java library project. Every test is a unit test and all its dependencies are pure java libraries: dagger 2, rxjava, lombok, junit and mockito.
  • data: java library project. It’s the repository that supplies the data which will be consumed by the domain module. Dependencies: domain module, retrofit 2, dagger 2, rxjava, rxcache, lombok, junit, and mockito.
  • presentation: android app project. It links the two previous modules and implement all the views interfaces defined in domain module. Dependencies: domain and data module, dagger 2, rxAndroid, lombok, butterknife and espresso.

The application implements a minimal example using the Github Api. The purpose is to illustrate in a simple way the natural workflow derived from this kind of architecture, using the classes created in the foundation packages in every one of the 3 layers.

To facility the use of this project as a common base one for any new project, a gradle task called freshStart has been created. This task removes the earlier mentioned minimal example, leaving the appliaction in an optimal state to start any new project.

Just run the next command from any terminal located at the root project:

$ ./gradlew freshStart

After that, build and clean project

Some considerations:


  $ ./gradlew clean build spoon -P classNameTestTuRun=fully.qualified.TestCase

$ ./gradlew clean build spoon -P classNameTestTuRun=presentation.common.SuiteIntegration
  • To use Gradle Retrolambda Plugin you will need to install JDK 8 and create JAVA8_HOME environment variable. The same for your previous JDK (e.g: JAVA7_HOME). So please make sure that JAVA8_HOME and JAVA7_HOME has been added to the path of the system
 $ nano ~/.bash_profile  export JAVA8_HOME=/Library/Java/JavaVirtualMachines/jdk8_etc/Contents/Home  export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk7_etc/Contents/Home  export PATH=$PATH:$JAVA8_HOME:$JAVA7_HOME

Also, specify in Android Studio the JDK Location pointing to jdk8 /Library/Java/JavaVirtualMachines/jdk8_etc/Contents/Home

Resources

shapeletter is a simple view that displays a letter within circle or rectangle much like the gmail app.

ExVidPlayer is simple library that abstracts ExoPlayer.

Features:

  • Gesture controls.
  • Brightness controls with one single touch vertical scroll.
  • Volume controls with multitouch vertical scroll.
  • Forward on left swipe.
  • Reverse on right swipe.
  • Player controls

Data binding library for Android which is:

  • Lightweight
  • Doing one thing and doing it well
  • Easily extendable
  • Fully covered with unit tests
  • Working great with Jack, Retrolambda or Kotlin

A small String Template Library for Android and Java without any Dependencies.

Storing Credentials securely on a Device is a must. To make that possible we have combined the Android Keystore for generating Cryptographic keys, and storing them securely and using those keys we encrypt the credentials and save them in the SharedPreferences.

hiddenshot is a simple library to take a screenshot programmatically on demand. Screenshot is saved in the picture folder on the device. You may also share a screenshot programmatically.

  • Share a screenshot as image or image with text.
  • Take continuous screenshots periodically.

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