To accomplice this, the dependencies Retrofit, Glide and Trustkit should be moved to new module, let's call it Parley-Network. This module would then be optional to include as a dependency. The rest of the SDK should be loosely coupled with the networking layer, so it should only interact with it via interfaces.
This setup would allow us to do all api requests with our existing network layer instead of using custom interceptors to allow interaction with our secured backend. This would bring us the following benefits:
It would be less maintenance in the long term.
This would also allow us to fix an issue with loading images, since they don't add the correct http headers at the moment.
It would allow us to correctly handle networking/security errors, since we can convert them to the format that the SDK expects. This is currently not possible with interceptors.
Is this something we can pick up soon?
It's quite a lot of work, so it would be good that we can all agree on this that this would be a good improvement.
Just like the iOS project (https://github.com/parley-messaging/ios-library/issues/77), we would like to be able to do all the network traffic with our own implementation.
To accomplice this, the dependencies
Retrofit
,Glide
andTrustkit
should be moved to new module, let's call itParley-Network
. This module would then be optional to include as a dependency. The rest of the SDK should be loosely coupled with the networking layer, so it should only interact with it via interfaces.This setup would allow us to do all api requests with our existing network layer instead of using custom interceptors to allow interaction with our secured backend. This would bring us the following benefits: