Currently, enviroCar android app Car selection process give much flexibility to user for simply type in attributes values or select from the data feched from REST API. This selection process is prone to error as user can set undefined or non-existing values of car attributes and create artifical type of car which later lead to collection and processing of invalid data. Also, track based database is based on SqliBrite which has been depriciated by the Square, there will be no further support. For new user it is difficult what/where OBD is and how to pair with the app, how to use app(?), What is the function of different controls(?), no help regarding this is provided. Considering all the issue and lack of features my goals are:-
1. Improving car selection process with previously defined datasets of vehicles which is app side implementation using Room database and designing UI for new car selection.
2. Re-implementing track-based database based on SqlBrite to new database based on Sqlite database with Room ORM to ensure support and to be flexible for modern components.
3. Adding a contextual help finding and pairing OBD with car and Walkthrough screen to highlight different controls.
Details about Goals can be find here in Introductory blog post
Weekly Status Reports
(Workflow 2 is according to software design principle)
Github Branch Link
- Fixed enviroCar database object null error.
- Fixed tokenizer error on importing .csv files.
- Added query for manufacturer table insert based on JOIN between vehicles table and virtual table created from vehicles table.
- Remove undefined manufacturer insert from the query created from insert operation.
- Fetch manufacturers table data and added to autocomplete text view.
- Integrated database with car selection UI.
- Fetch vehicles table data
- Create Car type with Vehicles data
- add Car to autocompleteListView based on pair of different type.
- Added unit test for Vehicles Database
- Created room database in memory.
- insert vehicle data check for successful insert.
- Fetch vehicle data check for successful fetch.
- check primary keys not null.
- check for database entries.
- Inject envirocarVehicleDB object null error having circular dependency with room database callback.
- Importing .csv file , Using stringtokenizer seprated by ',' in case some fields are blank in particular row it is not consider as token and insert operation failed as evry row will have different number of tokens.
- Improve @Provide method for Room database object.
- Categorization on the basis of Fuel Type.
- Desgin new UI for CarSelection process.
*Started working on module 2 (Designing new UI for car selection interacting with the database created)*
- Added circular dependency which earlier throws null pointer Exception and improve @Provide for room database object.
- Fixed delay in prepopulating the room database before using object in CarSelectionAddCarFragment.
- Added fuel type attributes based on the car.
- Re-implemented DataCollectort class (.csv file reader) and used OpenCSV to read .csv file which earlier is based on tokenizer causing insertion of garabage values in some fields because of not considering blank in some field, mainly the issue was with power_source_id.
- Fix UI related bug in car selection fragment and created and push the issue and PR.
- Fix UI freezes for fraction of time in CarSelectionAddCar fragment.
- Added restriction to users to select or type in attributes values which is fetched from database otherwise set error in the autoCompleteTextView.
- Added more parameters in function FuelType resolveFuelType(Sting fuel) and fix error related to fuel type.
- Complete Module-1 Integration of vehicles database (Room database with old UI) and updated and push the branch and updated the checklist in the PR (https://github.com/enviroCar/enviroCar-app/pull/520).
- Inject room database object in SplashScreenActivity, later fixed by class extends BaseInjectorActivity and added injection method.
- Reading .csv file and insertion of garbage value in the database.
- Converting FuelType to string and vice-versa.
- Design the card view showing car details.
- Design UI for selection of car from the list of cars after searching based on some of the car attributes.
- Adding functions in CarSelectionAddCar fragment,CarSelectionTsnHsn fragment,CarSelectionAttributes fragments for registering car at server if not registered and adding the created car to list etc.(I will analyze the requirements and add more functions accordingly).
- Please visit my daily log to track the development on daily basis , i also included new UI for car selection created in daily log Link- GoogleDocDailyLog.
- Added query to fetch car based on HSN and TSN values and fixed bug on fethcin based on HSN/TSN.
- Designed UI for car detials list for the selection on the basis of car attributes (Manufacturer,model,year).
- Created adapter for car detail list and added interaction callback interface to used with adapter.
Function declaration in interaction callback interface
- Car createCar(Vehicles vehilce) - to convert Vehicles entity to Car entity.
- String resolveFuelType(String power_source_id) - to get fuel type pn the basis of power_source_id of vehicles.
- void addAndRegisterCar(Car car) - register car on server and add to list of car from the car instance return from createCar(Vehicles vehilce) .
- Understand the concept about function descriptors <T,R> and created interface to be implemented in CarSelectionActivity so that itis accesible to both HSN/TSN and attributes fragments.
- <T> Function<T,R> createCar(Vehicles vehicle);
- FuelType getFuel(String power_sourfce_id);
- void registerCar(Vehicles vehicle).
- Added quick fix to register car at server in gsoc/car_selection branch (previously the car is not registering as we are comparing car already exist with database entires and it always set to true).
- Added functionality to register car at server in gsoc/new_UI_car_selection branch.
- Read about material textField componenet and change the textField UI according to material design.
- Learn about modal Bottom sheet and implements the Fragment for modal bottom sheet and design UI for car overview to be used in modal Bottom sheet.
- On succesful fetch vehicles from database based on HSN/TSN values display the overview in modal bottom sheet.
- Cast the Vehciles entity to Car entity and registering and adding car to listy by using the function imlemented in CarSelectionActivity calling in fragment.
- Improved interaction with modal bottom sheet fragment i.e on click on mark close all the fragment and openthe CarSelection activity to display the car added to the list.
- Fetch all vehicles and add manufacturer_id and id in HSN TSN AutoCompleteTextView on success using RxJava DisposableSingleObserver.(Previously only search based on input is working no suggestion shown).
- Added composite disposable and check for textChanges to make reactive field , so that only the values in the list are allowed for selection.
- Check before searching the car if the hsn/tsn field is empty or error has been set because of values not contained in the list set during textChanges reactive field.
- Fix fetch first row from database containing headings and added ime options and ButterKnife @OnEditiorAction for implicit submit.
- Added next field focus onItemClickListener and set next adapter in TSN AutoCompleteTextView based on hsn or manufacturer_id.
- Fix app crash on getAdapter in hsn AutoCompleteTextView.
- Set HSN field to accept numbr only and reset error on TSN on changing first HSN value.
- Completed UI design and functionality to create and register car in HsnTsnFragment.
- Registering car at server if the car is already exist in the server or check before registering car already exist but that is time consuming as we have to fetch all the car and compare with the server data.(Analysed that the registering same car should return same location header ).
- Add functionality to register car in CarAtrributes fragment and set car list based on selection.
- Working in idea 2- Reimplementing exisiting track database based on Sqlbrite.
- Please visit my daily log to track the development on daily basis. Link- GoogleDocDailyLog.
- Fetch vehicle database for car selection based on attributes and update the AutoCompleteTextView based on database entries.
- Added ButterKnife @OnTextChanged callback after text change to reset next edit text fields based on the change in previous edit text field.
- Check for focus in different edit text and update the data in AutoComplete text view according to the selection and focus change.
- Reactive edit text field to force user to select from list only otherwise set error in the field with error message "not in the list".
- On search car check if the edit text error is set and field is null otherwise proceed searching.
- Created Modal Bottom Sheet to show the list of car after searching using attributes manufacturer,model,year.
- In database construction date is of the form dd.mm.yyyy , but we are creating the car on the base of year only (yyyy) so to search the car we have to find the substring of type yyyy in allotment date column, so the final query for that is @Query("SELECT * FROM vehicles where manufacturer=:manuName AND commerical_name =:model AND allotment_date LIKE '%' || :year || '%'") where year string is of the form yyyy.
- It is seen that the same model is having different manufacture name so model to year pair not work as all year of particular model fetch without consideration of manufacture and searching fails for some cases , so i added map of pair<manufacture,model> to year.
- Added recyler view adapter and interaction callback function defination to register car and resolve fuel type.
- Remove the query fetch for vehicles database multiple time and added query fetch for vehicle database in parent fragment activity and pass the values in child fragment.
- Added the name of manufactre with HSN in HsnTsn fragment and remove menu from CarSelectionAddCar fragment and added call dispose for compostie disposable onDestroy() previously added for reactive text field.
- Finalizing the car selection on the basis of car attributes - remove unused codes and added string resources value.
- Improved the final overview Modal Bottom sheet fragment containg list of car.
- Added card view for list of car.
- Option to expand and collapse card to show car details overview.
- On card collapse Manufacture,model,year shown.
- On card expand HSN/TSN, fuelType,Engine displacement,Power.
- Completed mid term Blog post and submitted for review and finalzie the work for first evalutaion.
- Branch link:- https://github.com/enviroCar/enviroCar-app/pull/527.
- Working on idea 2- Reimplementing exisiting track database based on Sqlbrite.
- Please visit my daily log to track the development on daily basis. Link- GoogleDocDailyLog.