Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

ADBClient changes (singelton is gone) #225

Open
rickx opened this issue Aug 26, 2022 · 1 comment
Open

ADBClient changes (singelton is gone) #225

rickx opened this issue Aug 26, 2022 · 1 comment

Comments

@rickx
Copy link

rickx commented Aug 26, 2022

Hi,
can anybody explain why the sort of singleton in ADBClient (you accessed it using ADBClient.Instance) was removed? I see now the ADBClient needs to be sent as parameter everywhere. Is there any advantage in this?
What happens if you instantiate multiple ADBClients - doesn't that cause any issues? Or is there a special mode to do so without risk?

thx

@xutongqing
Copy link

Hey everyone.

The AdbClient has a simple constructor. All that is missing from the current docs is to remove the static singleton Instance accessor usage and instead create one single instance and use that AdbClient yourself.

As with any OSS project I'm thinking either we all figure it out on our own, or we raise a PR to suggest a change.

So until anyone of us does that I suggest you just new up an instance of the AdbClient and go from there! It's suggested to only use one such instance for your app.

just see this from respone

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants