This repository is a fun side project that utilizes the Growstuff API
My main goal was to see how complete I could make this app + SDK with only 2 days of development time. While I will likely add more in the future, the development time for this is only scheduled from 2019-01-16 to 2019-01-17
The other useful part of this project is that I am essentially writing a Java / Android SDK for Growstuff, which to my knowledge does not exist.
Below is the current outline for what I would like to get done in the 2 day window I have alloted:
-
ManifestManifest declated with permissions as well as broadcast receivers.Will add File Providers if needed - Not neededBroadcast receivers as well as check for Nougat or above to confirm Broadcast receiver registered properly
-
DocumentationAll docs should be in standard Javadoc format. (will be generated at the end of the 2 days)All classes should have documentation above them.Applicable methods and functions should also have documentation.Make sure to use //region and //endregion tags for simpler code folding
-
Data modelsMirror from website - Will need to make individual calls in order to manually view responses.Add in ErrorModel and custom parsing.
-
API Calls + WrapperFor API calls class, Will likely utilize my own library's Retrofit ParserMake wrapper class for static API calls so as to mimize code in Fragments and activities
-
Connectivity ChecksAdd in connectivity receiver to confirm internet availability before callsUtilize a snackbar for no internet connection
-
ArchitectureApp will follow standard app architecture logic and have an Activity with modular fragmentsI'd like to use a navigation drawer if possible as they always look clean if done correctlyStandard MyApplication class as central singleton with initilized fields upon load.Decided to scale things back a bit for simplicity. Will leave the API Interface as is and just ignore unused endpoints.
-
Android JetpackI'd also like to make use of the new Android Jetpack modules, specifically the following:RoomsViewModel
Implement Observers using ViewModel + Room combo on any visible RecyclerviewsUtilize View models to maintain state upon rotation
-
ConstantsUtilize integer tags in combination with my library's On Task Complete Listener to ping back responses for web callsMaintain any other needed tags, flags, or booleans within the Constants for simple reference.
-
IconsUse custom icons for the appUse various icons for the different nav bar icons to differentiate sectionsMake sure icons mirror Android standards of:xxxdpixxdpixdpihdpimdpi
-
Res DimensIf time permits, utilize dimens.xml to have screen-specific sizes to work with on UI element scaling
-
UI ComponentsMake heavy use of Recyclerviews (look into making mutli-purpose adapter)
-
Animations- SkippedIf time permits, add in animations to UI elementsAlso add in loading view / progress bar with custom animation built into it
Development has stopped (as planned) after a little under 2 days of development. Some of the better accomplishments include:
- The project is stable and loads just fine. Crashes seem to be far and few between
- It will successfully load from the API and load images as well as crops
- Pagination was successfully implemented and should theoretically scroll until the web API runs out of items to return
- Jetpack --> Room --> DB entry was integrated and serves the purpose of providing access to the crops list when offline
- UI is clean and has a simple nav drawer, custom recyclerviews, custom dialogs, and ripple effects on clicks.
- Despite them being unused, created response body objects to mirror those listed on the Growstuff Github link.
- Utilized external dependencies via gradle as well as annotation processors and the schema output for the DB.
- Created a workable SDK that can be modularized into a single project if those at Growstuff would like it.
- Utilized abstract parent classes and subsequent inheritance for future-proofing more activities and fragments that may be added.
Next time I do this type of project I will probably research the API more prior as I had assumed that this API would return image URLs nested within the Crop object, but that does not seem to be the case in the current version; this nixxed any plans on having miniature circular images next to the text in the Recyclerviews.