-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Android 11] Mouse click doesn't work on my Google TV unless target item has focus #28
Comments
Thanks for reporting @fil-dariane It has come to my knowledge that several TV providers are removing the gesture APIs from their Operating systems. MATVT relies on this API for clicking on places where otherwise a click is not feasible. As you mentioned it works when item is focused, this is because of a fallback that I'd coded in for Android 6. In order to make the mouse work on OSes without support for gesture API, we'll need some root level permissions, or a miraculous work-around. I'm working on a completely different core engine (details in #24), but as reported by @sweenwolf it'll lag behind the current normal mouse. I'll post a pre-release apk and inform you here. Would need you to test that out when it's available 😄 . |
Thanks for your response and explanation @virresh. I can test on my TV when you have something. |
Hi, @virresh. Here's my testing feedback using my TCL Google TV. The new MATVT functionality that you have just added can be intermittent on my TV. When this happens, the MATVT mouse click and scroll do not work. However, the MATVT DPAD functionality still works, the TCL stock remote control works, and an external USB mouse works. The MATVT app shows that the permissions are set and the service is running. This problem state can already exist after MATVT installation or it can just happen suddenly later for no apparent reason. Restarting the MATVT service in System -> Accessibility does not fix it. Restarting the TV can fix it. When the new MATVT functionality is working, the mouse click works fine and the latency is about half a second, which is acceptable. However the scroll functionality has an issue due to slow handling of queued scroll events. Touching a button quickly in scroll mode typically generates 3-6 scroll events. The first one executes a half second later, which is fine, but then there is a regular one-second delay between all the remaining queued events. If you hold the button down longer, it can easily generate 50-100 scroll events. This can make the UI of the TV unusable for more than a minute. You should be aware that these new TCL Series 6 Google TVs like mine have recently been in the news for OS and latency issues. |
Just to be clear, I see no scroll latency issue when the DPAD is used to scroll a window. I can hold the button down in MATVT DPAD mode or on the stock remote and it scrolls fast with no latency at all between scroll events. It's only the MATVT scrolling that has this issue. |
Thanks for testing @fil-dariane The intermittent issue with MATVT glitching out is an interesting one. I haven't come across that yet. My best guess is that adb quietly goes to sleep and requires a force close of the app in order to re-establish the connection. I'll have to do some more investigating on that part. Do share if you get any more info on this. Unfortunately, the delay between two scroll events is something I cannot control. It's an issue with adb latency as mentioned in the other issue. I can try to manage the queue a bit better and discard all pending scroll events in case some other button is touched. Thanks for testing it out. I think it'll take a lot more time to tune out the rough edges, but I hope I'll get some time to work on them soon. |
Managing the queue to discard excess scroll events should fix that backlog problem, assuming there's a good point during scroll event execution when you have control to do that. |
Just a question: If ADB lib latency is an issue, is there a way to emulate a USB device? I see that a physical mouse plugged into the USB port has no latency issues. |
Yep.
A good question, and yes it's possible, but when emulating a USB device, I do not have an option to intercept the existing remote's buttons. I need to have a hook at the software level, and without rooting, this is only possible with an Accessibility App. |
I have same issue using Shield tv since I updated it to android 11. |
@zdpark have you tried the pre-release version above #28 (comment) ? |
Yeah I did. I heard there are some changes with the gesture api since android 11. |
Do you have any reference for this? If I get to know the exact changes, it might be possible to revive the old engine itself and make it compatible instead of relying on adb hacks. That should eliminate the problem. |
Some more feedback re. the "intermittent" issue: Sometimes when I see this, I notice that another app using Accessibility Service (Button Mapper by flar2) has also stopped working, so you're not the only one. In this case, the apps are shown as Off/Disabled under Settings -> System -> Accessibility. I set them On (and typically Off and On again) and the apps start working again. Perhaps some internal process for Accessibility has restarted unexpectedly. My TCL Google TV Android System does seem to be underpowered and buggy. I get better and more reliable behavior by keeping the process count down and by doing a full restart every so often. Hopefully future promised updates will help, but it must cause problems if certain processes restart unexpectedly. There is a setting Settings -> Developer options -> Background process limit, which can be set to Standard, none, 1, 2, 3, or 4. I read that this primarily affects cached services rather than apps. I had been experimenting with this, but to avoid confusion here, I decided to leave it set to the default Standard (supposedly 20?) and to manually terminate unneeded background apps myself. Another source of confusion is that it can be tricky to confirm the ADB prompt to allow USB debugging when it pops up for MATVT. It occurs at the first click attempt when the need is detected. At that time I need to use DPAD mode to confirm. If I don't confirm it correctly, there will be no chance to do it again until restart, which explains my observed "intermittent" behavior requiring restart. Separate from this: It is also an issue that I cannot obtain a "long" press by holding the click button down. I suppose the latency of this method makes that difficult. |
NVIDIA has responded on this issue and they will add the fix it in the future hotfix 9.0+ release. @virresh NVIDIA has shared the cause of this issue here: Apparently, Google has fixed it in Android 12. |
Thanks @fil-dariane for the clarifications. It makes sense that the OS would kick out matvt services from background process to free up ram space, and I don't think there's any way around that. Regarding the ADB prompt, maybe will try to make it a bit easier someday, but given the above comment about Android 11 updates planned to fix this, I'd probably wait before implementing anything on this hacky engine. @juzmafia Wow, that's huge. Hopefully updating to a newer version should fix the problems for most people then. I'll keep the experimental ADB-driven engine here itself as a pre-release only, just in case anybody needs it. It's not pretty, but does the job 😅 |
@juzmafia Thanks for sharing this information. @virresh That seems like the right way to proceed based on what we're hearing so far. My TCL TV just sent me an OS update, but it's still Android 11 and when I retested the official non-ADB MATVT it still doesn't work. I will let you know if I have any further news and use the ADB MATVT in the meantime. |
Is there any update on this one? |
@dikodahan chromecast buttons work slightly differently, so you might have to configure your chromecast to send input to Android instead of sending it to TV. The pre-release ADB version is meant for Android 11 boxes, can you explain what kind of issue you're facing? |
Hi, for me it's working on Realme Stick 4k and Mi tv Stick 4k
====== Maintainer Edit Start =======
Please watch in this video: [REDACTED] download link, Video links in below comment
Note: Please prefer downloading from official sources (https://github.com/virresh/matvt/releases), instead of creating mirrors. Mirrors are dangerous because of undisclosed source code and hurt the downloads stat, the only thing that is available to the project author as a metric of project usage.
====== Maintainer Edit End =======
Are you active the developer mode?
Em seg., 21 de mar. de 2022 17:33, Moshe Dahan ***@***.***>
escreveu:
… Is there any update on this one?
I am having the same issues on the Chromecast with Google TV, which is
running Google TV 10 & also on a Mecool KM7 box running Android TV 11.
I have tried both the original 1.06 and the pre-release ADB version of
1.06. Unfortunately, no luck with either...
—
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYCNETYK4KKIXDOOLDIXCFTVBDMKXANCNFSM5JP4276A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@ytsystemtv |
Not the first time I have been using this app (great app BTW!). |
Sorry, I was going to send the link to my video and I accidentally sent the
abbreviated apk link but it's the same one you provided here, it's just
shortened the link.
Realme Stick 4k : https://youtu.be/yUOxufPKLHE
Mi tv stick 4k: https://youtu.be/bbkeSL0Ljq8
Em sáb., 26 de mar. de 2022 10:09, Viresh Gupta ***@***.***>
escreveu:
… @ytsystemtv <https://github.com/ytsystemtv>
I presume good faith, but can you provide the source code for the APK you
linked above?
It's dangerous to use apks without knowledge of it's source. If it's the
same as the one in releases <https://github.com/virresh/matvt/releases>,
please do not create mirrors. It only leads to unnecessary confusion.
—
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYCNET4AY3ODOAEVQL4FWSDVB4D73ANCNFSM5JP4276A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In the two videos I show that I managed to configure the Realme Stick 4k
(Google tv) and Mi tv stick 4k (Android tv 11) ... all functions are
working very well, except for scrolling, we press once and it multiplies
the touch by 4x ... I would like to give you this feedback. Thank you!
I'm following the news!
Em sáb., 26 de mar. de 2022 10:09, Viresh Gupta ***@***.***>
escreveu:
… @ytsystemtv <https://github.com/ytsystemtv>
I presume good faith, but can you provide the source code for the APK you
linked above?
It's dangerous to use apks without knowledge of it's source. If it's the
same as the one in releases <https://github.com/virresh/matvt/releases>,
please do not create mirrors. It only leads to unnecessary confusion.
—
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYCNET4AY3ODOAEVQL4FWSDVB4D73ANCNFSM5JP4276A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Cool.
@dikodahan yep, seems like it. I have no other explanation. Unfortunately, I don't have a Chromecast with me to check this though. |
Thank you for your work, Virresh |
Hi @CrueRock , I have identified the root cause and will send out a fix for testing. Let's continue Android 12 related discussions on that thread and leave this for Android 11. |
Hi virresh,
Many thanks for your work and for the way you handle this project.
I have a new 2021 TCL Series 6 TV running Google TV based on Android 11. I've installed MATVT v1.0.6 successfully and can see and move the mouse cursor. But pressing the center button to click the mouse does not work -- unless the item I'm clicking already has focus, i.e. shows the visible indication of focus and would normally respond if you press the center button in normal DPAD mode. It also seems like the DPAD buttons have no effect in Scroll Mode. A normal mouse plugged into the USB port of my TV works as expected.
Please let me know if there is any workaround I might try, and thank you for your attention.
The text was updated successfully, but these errors were encountered: