-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug: Gestures ignored on right-side landscape #8
Comments
We are experiencing the same problem. This could be related: #2 |
@stoefln it might be the case indeed. |
Hello @koral-- , could I humbly ask you to check on this issue? I went through the |
It seems like the mapping is not performing correctly. When a device is in portrait mode being connected through STF - it works fine, even if switched to the landscape mode (I suppose android rotates to its left-side, because on the right-side it doesn't work at all). However, when a device being connected while in the landscape mode, two scenarios are possible:
While it's possible to workaround this issue by connecting the device in the portrait mode and once everything is done rotate on its left-side (or keep in portrait, whatever best suits), it's not resolving the underlaying @stoefln you might want to check it out as well. 👆 |
@mark-omarov thanks a lot for your insights! |
Hi @stoefln! I've performed a few further investigations of minitouch with STF and can say that for those versions Android InputManager is being used, so all the commands are forwarded to the STFService. And it seems that the mapping itself is actually handled there, since I could not find any related logic for mapping in the minitouch itself. I think it's something that should be handled on the STFService side, unfortunately, I'm not an Android Developer, and can't dig into it deeper, I'll see if I can get an actual Android Dev to take a look at the problem. Thanks for sharing your fallback solution! |
Hi all. I am answering since I was summoned. Here are my thoughts:
At the moment I don't have capacity to investigate the issue further but I will be happy to review PR. |
@mark-omarov did you find any solution for the landscape problem? |
Hey @stoefln, I don't have the capacity to work on this issue furthermore. But, yes I kinda dealt with it using a workaround.
I've had an android dev take a look, unfortunately, he didn't find a solution to this problem, his attempt was to remove calculations from the STFService, so the inputs are 1:1 mapped to the device pivot point. I've tried to play around with this updating the frontend part, but obviously, since devices earlier than android 10 versions are using a different input method - this is a breaking change for them. |
Thanks so much @mark-omarov for the update. I kind of gave up on it too. Will try to switch to ws-scrcpy instead. |
Sorry to come late to the party (didn't get any notification or possibly missed it). |
Hey @pcrepieux , I'm curious if I was nearly right with the cause of the problem? Thanks for taking time to get it fixed, much obliged! I'll test it as soon as STFService is updated. |
Exciting news 🥳 |
Fixed in DeviceFarmer/STFService.apk#68 |
For me it's still not working. Actually landscape is not working at all above Android 10, no matter which side. |
Hey @stoefln , if I remember correctly - you don't use STF, rather implement your own solution, is that right? |
Thanks a lot @mark-omarov for letting me know. Yes, it's my own solution. Most probably we will switch to scrcpy if everything is going well. Otherwise I will take a closer look how OpenSTF is communicating with StfService... |
In case it might help, for touchscreen interactions, STF still communicate with minitouch as it used to do. But, starting with Android 10, minitouch will simply forward the commands (which are text based) to the STF agent by mean of a dedicated local socket ("minitouchagent"). |
@pcrepieux thanks a lot for trying to help! I am making use of the agent, and it works great for portrait (actually default orientation), so I assume it's not related to the way I set up the service and the agent. But it doesn't work for landscape (90 and 270 degrees) on Android 10 devices. Below you will find the class I wrote for launching service, agent and sending commands. I think I am missing some piece of information, because like you said OpenStf is able to handle landscape and I am not. Is maybe my coordinate mapping wrong? I tried to find the relevant piece in the openstf codebase many months back, but without success.... |
Hey @stoefln , I can't compare your code to the STF version, don't have access to a laptop now, but here's the file that's responsible for calculations in STF, maybe it will help you out. |
@mark-omarov thanks a lot. I just tried to figure out what OpenStf is doing differently, but it's complex. So it will take me more time I guess. |
Description:
Gestures ignored when the device is stored on its right-side w/ landscape mode on, as soon as the device is rotated to its left-side gestures work correctly again.
Noticed on devices w/ versions: Android 11, Android 12 (Android 12 also has a problem with minicap in the landscape mode).
Minitouch consumer/environment: STF
Steps To Reproduce
The text was updated successfully, but these errors were encountered: