virresh / matvt

Virtual Mouse for Android TV that can be controlled via remote itself.
GNU General Public License v3.0
211 stars 35 forks source link

Xreal Beam - Unity app does not receive volume and 3D buttons #74

Open raldnor opened 11 months ago

raldnor commented 11 months ago

Hi all,

I have tried to use the app on an Android device that normally uses a home launcher written in Unity. When I replace this launcher with ATV launcher (a normal Android TV launcher) MATVT works correctly. But when I start the Unity app the D-Pad works, but no input is received from the volume- and side buttons. The side button is recognized by Android as 206 (KEYCODE_3D_MODE). The volume keys generate 24 and 25 codes (VOLUME_UP and VOLUME_DOWN).

Are Unity apps different in recognizing input from the accessibility input mode?

coallin commented 11 months ago

Hi raldnor I am also a Xreal Beam user, sorry I am not here to provide an answer, but for another question. My device won't react to mouse click, when I press DPAD middle button there's nothing happen. Also there's no scrolling on the edge of the screen. I am only testing under ATV launcher and some apps like Netflix. Is it the same situation on your side too?

raldnor commented 11 months ago

Hi Coallin,

No problem, glad to see there's another Beam user here as well. I used the adb version (the one mentioned in this thread: https://github.com/virresh/matvt/issues/68) and I can use the dpad middle button. For scrolling I have to switch to scroll mode (I assigned a long click on volume up to change modes). The weird thing however is that when using the mouse mode and hovering over the tiles in ATV launcher nothing happens (the tiles do not respond to hovering), but a click is registered.

Hope this helps you somewhat, but for me MATVT in its current state is not usable on the Beam unfortunately. I hope it will be in the future though, because a lot of elements in Android apps cannot be reached by using the DPAD (like scrolling the page in Jerboa for example or using menu items in the top menu of certain apps).

I also tried to setup a wireless ADB connection (when I had the original firmware, I have updated recently and now the developer options are gone) and have injected the keypresses using ADB commands, but they weren't registered in the Unity app as well. Xreal has enabled the multi-user functionality in Android with the latest update thereby removing the possibility to access the developer mode. Hopefully someone figures out how to root the device so we can use the Beam the way we want. For now it seems Xreal is trying to create a walled garden with a lock-in on their platform.

coallin commented 11 months ago

Thanks Raldnor! Your reply is really helpful, I had the same situation and gave up XD I found another paid app called tvQuickAction Pro is stable and usable.

I also noticed an interesting fact: After you press Win+N then add a new user, press Win+N again and switch back to the Admin user, you will be able to have access to the developer options.

Every time you restart the device, you will need to do the [ADD NEW USER -> SWITCH BACK TO ADMIN] process to be able to access the developer menu.

So you will eventually create a lot of new users and need to delete them every now and then. Oh you also need to do the same thing(add a new user then switch back to admin) to be able to go to the user managing menu.

I haven't tried to root the device yet though, I was being bothered by another issue, which is when connected to a 2.4Ghz wifi and Bluetooth headphones at the same time, they interfere with each other, wifi becomes very unstable, and the audio is terribly stuttering. I don't have a 5Ghz router right now, and many public wifis are 2.4Ghz. Just totally can't listen to music or watch any videos.

Apologize for moving away from the original topic of this post :D But please do let me know if you have further progress on making the device more powerful!

Katsuyamaki commented 10 months ago

Hello coaliin - did tvquickaction pro work for you in EVA launcher with 3dof? If so, how did you download it and get it to the beam?

virresh commented 7 months ago

Hi @raldnor Catching up on old threads. Was away for a long while.

Are Unity apps different in recognizing input from the accessibility input mode?

I imagine you're talking about a launcher written via the Game engine Unity. I imagine they'd use a different input model, since they would likely have to support gamepads etc in addition to the basic input modes, and I'm not sure how accessible these apps would be.

Thanks for trying the adb version. If the click works, that's good. We can send input keystrokes! Unfortunately, a lot of the keystrokes that we send can be modified by manufacturers in their roms to whatever they want.

The weird thing however is that when using the mouse mode and hovering over the tiles in ATV launcher nothing happens (the tiles do not respond to hovering), but a click is registered.

Yes, very valid point. When using the adb version, we are not sending any focus event. I think we might have to experiment on a lot of devices to come up with a set of focus event values that work. Will keep this thread open in the hopes of some future idea that can help solve this.