Hi fellows,
I have few questions regarding usage of ServiceConnector, especially OrderConnector.
In my app I have OrderRepository class, which is provide methods to get Order data (line items, etc).
This class is singleton(provided by Dagger), which has one constructor param: ApplicationContext. Using it I'm init OrderConnector instance, call connect() on it and store this instance in private property.
Questions:
1. Any thoughts about this approach?
2. In Clover documentation states "User must call disconnect on ServiceConnector when he is done". I'm not calling disconnect(), cause lifecycle of my OrderRepository class is Application lifecycle. Is it problem and I have to somewhere call disconnect() or it's ok?
Any thoughts / best practice in using ServiceConnectors will be greatly appreciated.
Thanks!