BikeRun2 is application for runners and cyclists. Optionally integrate with Strava.
My goals:
- application should be esay to use by user
- application should be easy to modify and adding new features by developer
- user shoud have possibility to modify sport layout (9 indicators showing distance in one view? No problem!)
- user shoud have possibility to modify settings of preparing data (Min gps accurancy = 1m? No problem!)
- user shoud have possibility to modify format of displayed data (displaying data from ANT+ sensors more than 1 per secons? No problem!)
If you want build this app you have to add keys:
- strava key in api_keys.xml file
<string name="strava_secret">put_your_key_here</string>
<integer name="strava_app_id">0000</integer>
- google maps key in google_maps_api.xml file
<resources>
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
add_here_key
</string>
</resources>
Idea is simple. User clicks in sport activity button (running, cycling or cycling on stationary bike) in menu and automaticly background service is created and starts emmiting data (like time from GPS, actual speed and more) by RxJava to view( DataFragments) and "Training" object.
Training object have several tasks:
- log training to database
- prepare some data (like average speed or distance of trip)
- send preapred data to view
Fragments are divided into 2 groups:
- contaiers
- dataFragment
Containers only contains DataFragment so we can easily exchange them.
DataFragments connect with background service by Binder and subscribe data by RX. Every ButtonFragment, DataFragment or MapFragment is a separate fragment so they are independent of the container.
- Retrofit
- Dagger2
- RxJava2
- Butterknife
- Realm
- Retrolambda, Streams (Android and Java8 😠)
- No libs hardly based on
reflectionlike EventBus! - and more...
- skeleton of app
- base functionalities
- dependency injection
- logging user profile and sport activity to DB
- integration with Strava
- ANT+ support
- finish Strava integration (segments, sending result)
- gpx support
- release in Google Play