You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I'm migrating project from ConnectSDK 1.4 to 1.5 Lite and encountered a problem:
Every time gyroscope data comes my code checks MouseControl availability and invokes move method:
publicclassAppextendsApplication {
publicstaticConnectableDevicetv;
// return MouseControlpublicstaticMouseControlgetMouse() {
if (tv != null && tv.isConnected()) {
returntv.getCapability(MouseControl.class);
} else {
returnnull;
}
}
...
}
classMySensorsListenerimplementsSensorEventListener {
// this method is invoked continuously every N millisecondpublicvoidonSensorChanged(SensorEventevent) {
...
if (App.getMouse() != null) {
App.getMouse().move(dx, dy);
}
}
}
publicclassMainActivityextendsAppCompatActivity {
...
// connected to devicepublicvoidonDeviceReady(ConnectableDevicedevice) {
if (App.getMouse() != null) {
App.getMouse().connectMouse();
}
}
}
With ConnectSDK 1.4.2 this code works great, but with ConnectSDK 1.5 mouse movements sometimes don't work.
It seems that mouseSocket is not ready and it's created every time move method invoked.
I'm working with Android app that translates Gyroscope data to TV cursor movements.
You can find test source code at https://github.com/alexey-odintsov/MouseSocketTest (it's short).
Currently I'm migrating project from ConnectSDK 1.4 to 1.5 Lite and encountered a problem:
Every time gyroscope data comes my code checks
MouseControl
availability and invokesmove
method:With ConnectSDK 1.4.2 this code works great, but with ConnectSDK 1.5 mouse movements sometimes don't work.
It seems that
mouseSocket
is not ready and it's created every timemove
method invoked.Normal working socket logs are:
Socket logs when mouse is not working:
I've found a workaround by exposing
isMouseConnected
API insideWebOSTVService
class and updatingMouseControl
interface method signature:And by adding checking to my code:
But I believe there is something must be done with MouseControl socket creation logic.
The text was updated successfully, but these errors were encountered: