Working with api was realized using Retrofit
+ OkHttp
. For refreshing token was used MainIntercaptor
(it implements both Interceptor
and Authenticator
interfaces).
Api was separated to MainApi
and MainRefreshApi
to avoid dependencies cycle like: OkHttp
-> MainInterceptor
-> MainApi
-> OkHttp
.
Main screen was realised using dynamic features (install-time). Working with WebSocket was realised using OkHttp.WebSocket
.
- Clean architecture
- MVVM
- Dynamic features (Profile, Transactions are dynamic features)
- DI: Hilt (app) and Dagger2 (feature modules)
- Coroutines
- LiveData (View model / fragment)
- Navigation component (+ for dynamic features)
- Retrofit + OkHttp
- Gson
- Splash screen (for startup activity)
- Tests
- Avoid fragments recreation when switching
- Network errors distinguish and handling
- Rewrite subscribing to
Transaction
events from listeners to coroutinesStateFlows
(it was implemented usingMutableStateFlow
, but for some reason it had crashed without stacktrace. This bug was fixed in1.4.3
version of coroutines. And it can be rewritten)