[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[UI8] Interaction with remote screen

It would be nice to make clicks on UI8Screen and the mouse events be transferred to remote S8 system to be processed as UI actions.

It is a good idea but Apple simply do NOT publish any interface to make it using their approved APIs.
In case of Android we tr8ied to implement it using Instrument, but it is triggeting exceptions in cases of use as proposed in stackoverflow.
The code we used to test sending events programmatically follows:
| i event x y downTime |
downTime := SystemClock uptimeMillis.
x := y := 100.
i := Instrumentation new.
event := [:action|
 MotionEvent
  obtain: downTime
  eventTime: SystemClock uptimeMillis
  action: action
  x: x y: y
  metaState: 0
].
[ i sendPointerSync: (event value: 0"ACTION_DOWN").
 i sendPointerSync: (event value: 1"ACTION_UP").
 ] on: Error do: [:ex| self print: 'OOps - ',ex description ]

References