question

androiddev avatar image
androiddev asked

Usage of ServiceConnector / OrderConnector.

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!

OrdersClover Android SDKInventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community