Open tobiasBora opened 5 years ago
wow, that's weird. What version of Android are you using?
If you have adb
configured, you could try opening html file in mobile Chrome (e.g. http://192.168.1.14:42000/main.html
). If it fails there too, connect phone to PC, then in PC Chrome open DevTools->More->Remote devices->select your phone->Inspect, then copy JS errors that appear there.
Thanks for your answer. So, here is my first report, I think I understand a bit better what's the issue.
But I also have some questions/things I don't understand.
So first, for what I tried:
main.html
page with firefox, the layout is much better (and it can vibrate, even if it does not detect strenght). I don't have any strange Nan
value on the bottom line when I try to click somewhere. However, the informations are not sent back to my computer (which does not even create the joystick device). Any idea why it does not work with firefox? Is it linked with adb and the fact that I'm using firefox and not chrome? I'm curious, how is implemented the event link between the phone and the python code?Now, you asked me to use chrome... But it appears that on my phone I don't have any GAPPS (google applications) installed, and for tons of reasons (privacy, efficiency...), I don't want to install them. Does yoke require GAPPS in order to work?
Thanks!
-- EDIT -- The Webview in the app seems to launch "Browser" (default browser), which, when loaded manually has exactly the same bugs as the app. So I guess replacing Browser with Firefox could work if it's possible? Now, I still don't understand why Firefox alone does not send anything to the python code.
Browsers don't send any events to Yoke because events are sent over UDP (JS code running in WebView can call native Java code, which sends UDP packet).
I'm on Lineage 14.1-20190303-jfltexx without GAPPS (but with microG, though I think I tried it without microG some time ago and it worked too). Yoke works in Browser and in Yoke app.
Browser: org.lineageos.jelly version 7.1.2 Android System WebView: com.android.webview version 71.0.3578.99
If you are running the same, or newer, version of LOS as I do, check your Developer options:
In WebView implementation I can select "AOSP WebView" or "Chrome Stable" (I have Chrome installed, it doesn't require gapps or microg), Yoke works with both.
Thanks a lot for your answer, that's very interesting! So I have a much older Lineage: 14.1-20170525-UNOFFICIAL-a3ltex (my phone is not officially supported, and I don't have time to upgrade right now). I guess it's a bug on Browser?
So I tried to install Chrome (without GAPPS installed), and instead yoke works greatly now! Thanks a lot! But if possible I'd like to avoid to rely on Chrome, do you know if it's possible to get Firefox's geckos engine, or eventually upgrade Android System Webview (I would like a FOSS version)?
Thanks again!
EDIT: Here are my versions: Browser: org.lineageos.jelly version 7.1.2 Android System Webview: com.android.webview version 58.0.3029.83
What do you mean by "Yoke works in Browser". You mean only the UI, without the link to the computer? (deleted)
Yes, I meant the UI.
I guess it's a bug on Browser?
Hopefully it's bug in ASW. Otherwise, it would turn out that Yoke needs newer ASW than we have expected it does.
do you know if it's possible to get Firefox's geckos engine
Gecko engine is not exposed, so no. There is ongoing progress on GeckoView, but its API probably won't be WebView-compatible - details.
WebView selection seems to be limited, anyway, by this commit, the only problem is that I can't find it in LOS repos (but I think it's there, after all, it works).
I guess you could, in theory, build ASW yourself, though I think you would also need to re-sign all system packages so that signatures would match. Seems like a lot of work. To my knowledge, Google ASW is unmodified, just signed&redistributed in the Play Store, so I suggest you just grab Google ASW 75 (the latest, 76, broke motion controls) from apkmirror.
Wow, that's a weird bug.
I didn't write the code for the app, but it has very simple code and it doesn't depend on GAPPS. I'm using a rooted system with GAPPS removed and it works fine for me. (Wiko's Android Marshmallow + TWRP + Magisk + AFWall+ + microG's location provider, and this app doesn't use location in any way).
Just to avoid further bugs in the future...
(On the android, I can also see some numbers with one of the numbers being 'NaN', so I guess the error comes from that).
Could you tell which numbers? Is it the first and the second from the left? (We're having a bad experience with motion controls and I'm suspecting them.) Does this bug happen with other layouts?
Hello,
First, thanks a lot for this very promising app. The instructions using the old branch and the F-Droid app worked greatly, but unfortunately I wasn't able to use any button, making the app not usable. I think to understand that in latest versions, it is now possible to use buttons... But unfortunately I can't find how to use the latest version. Here is what I do for now:
pip3 install .
.devel/app-debug.apk
bin/yoke-enable-uinput
Then, I see several layouts (that's a great idea so far), and on the console I get:
and when I click on a layout (say Racing), I get a strange display, without any touchpad anymore (looks a bit strange), like that:
And when I randomly press some buttons, yoke crash on the computer with an error:
(On the android, I can also see some numbers with one of the numbers being 'NaN', so I guess the error comes from that).
Moreover, before the crash, jstest-gtk does not detect any joystick.
Did I make a mistake? If yes, how could I get a full working yoke, with touchpads and buttons?
Thanks a lot!