Select another 2nd or another device using ADBScreen

Asked by johnny doe on 2018-11-20

Hello please help me. I have 2 android emulator but I cannot make the program select the second emulator. I already look at ADBScreen code but it does not include setDevice() that is why I cannot select the second emulator.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

Yes, currently it only selects the first in the row (hardwired).

Currently I cannot help you, but I create a request bug.

If you have the knowledge:
Make your own ADBScreen subclass, that allows to select a device.
If you do, I would appreciate to look into your solution.

RaiMan (raimund-hocke) said : #2

please communicate further in the related bug

johnny doe (edison2214) said : #3

@Raiman I cannot use ADBClient.getConnection() because it is a private method :(. Some of ADBClient method is private bro.

RaiMan (raimund-hocke) said : #4

ok, I just looked into the code: to select a specific device other than the first in the row is indeed a bit tricky due to the fact, that the relation between ADBScreen, ADBClient and ADBDevice is somewhat static and hard-wired.

I will try to implement a solution, that you have to test then, since I do not have the infrastructure for that.

Please watch the related bug - here I will not answer anymore - so do not open this question again.