[1.1.4] [request] ADBScreen: Select one of more devices --- fix build #130 under test

Bug #1804175 reported by RaiMan on 2018-11-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

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.

RaiMan (raimund-hocke) on 2018-11-20
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
summary: - [1.1.4] [request] Select another 2nd or another device using ADBScreen
+ [1.1.4] [request] Select one of more devices using ADBScreen
summary: - [1.1.4] [request] Select one of more devices using ADBScreen
+ [1.1.4] [request] ADBScreen: Select one of more devices

I have added a solution to define an ADBScreen object for an other device than the first in the row, if more than one device/emulator is detected by ADB-support.

Please test and give feedback

adb = ADBScreen.start()
if adb: # check for success
  # now adb is the first device in the row
  adb1 = adb.getScreenWithDevice(1)
  if adb1: # check for success
    # now adb1 should be the second device in the row
    print adb1
    # now you should be able to use adb1
    print "no device at position 1"
  print "no devices"

If this works, I will add a feature to list the attached emulators/devices

Changed in sikuli:
status: In Progress → Fix Committed
importance: Medium → High
summary: - [1.1.4] [request] ADBScreen: Select one of more devices
+ [1.1.4] [request] ADBScreen: Select one of more devices --- fix build
+ #130 under test
johnny doe (edison2214) wrote :

@RaiMan where do I download bro? I try to download here https://raiman.github.io/SikuliX1/downloads.html but it says AttributeError: 'org.sikuli.android.ADBScreen' object has no attribute 'getScreenWithDevice'. I will donate bro if this work.

johnny doe (edison2214) wrote :

I found it now bro. I thought I need not change sikulix.jar but only sikulixapi.jar lol.

RaiMan (raimund-hocke) on 2019-04-14
Changed in sikuli:
status: Fix Committed → In Progress
importance: High → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers