Trakr. is a simple app that lets you track your activities.
Purpose of the project is to try out some Android-related libraries/frameworks, app is not fully reactive, RxJava is used only to deal with concurrency.
Not working with play services v11.0.55, tested with v10.2.98 Place picker crashes with v11.0.55, place auto complete works fine, still very slow (see Quirks)
- clone the project
- setup firebase add put google-services.json into app/ dir.
- get Google Places API key and put it into string resources.
- build and install
- Time picker is a bit dull, for the sake of simplicity available pick range is 00:00 - 23:59
- Place auto complete is slow
- Place auto complete shows slightly irrelevant results
- Proper state maintainer mechanism
- Back navigation stack
- Dimensions for different dpi screens
- "Internet connection required" dialog
- Auth re-signin on token expiration, etc.
StorageService.java is some sort of stub only. There are 3 scopes defined in the app:
@FragmentScope -(component depends on)-> @ActivityScope -(component depends on)-> @Singleton (app scope)
fragment scoped component cannot be dependant on 2 scoped components
(RemoteDBService & LocalDBService) are needed in fragment scoped (data fetching, CRUD) and activity scoped(create user record on successful registration) components
RDBService and LDBService are provided from appModule and then wrapped into StorageService for future usage in FragmentScope'd code.
- Place Picker is not working with play services v11.0.55, took me a couple of days to figure it out and try older version. Still, not solved...
- Implement listView with dynamic sorted (by timestamp) data with pagination, fetching data from multiple sources
exactly N sorted items (or less) are loaded from each data source -> merge -> take first N (or less) -> load static map images -> add to listview
-> if loaded more than N (combined/merged), then put rest into threshold -> update starting/ending points
-> if scrolled to end of current displayed data, then load more
Drawback -> let's say there are 100 remote and 20 local records and all local happened before all remote ones. Current implementation will keep all 20 local records in threshold and display them only if user scrolls to the end.