• 1 Post
  • 17 Comments
Joined 1 year ago
cake
Cake day: September 13th, 2023

help-circle










  • @sashin@vegnism.social @XTL@sopuli.xyz Alright, I’m back. Survey says: we are, indeed, Android yet!

    I found this example repo in my travels: https://github.com/inferrna/hello_world_android_egui

    It shows the same demo setup that can be experienced through a Web browser at http://egui.rs, only now as a native-code Android application. To compile it I had to:

    • install lld (it uses that linker I think exclusively and will complain if you don’t have it)
    • rustup target add aarch64-linux-android
    • ignore the build instructions in the repo since the tool they recommend (cargo apk) has been deprecated and no longer works (either that or i couldn’t get it working – xbuild is easier anyway)
    • cargo install xbuild
    • cargo update the repo since the version of android-activity it ships with is out of date and will crash since my version of Android passed it a null pointer it wasn’t expecting
    • connect phone to PC via adb
    • invoke xbuild to compile and deploy the app: x run --device adb:ADB_ID_GOES_HERE

    I did NOT have to:

    • download Android Studio, even as the command line tools (xbuild took care of downloading the SDK and NDK for me)

    (I did download them separately as part of a different troubleshooting step, but I deleted them and it continued working. Not sure what to make of this. Not about to reinstall my OS to make sure these steps are reproducible. Please let me know if they are or not!)

    UPDATE: It seems egui is not able to accept text input at all – it does not know how to bring up the virtual keyboard when you click a textbox, nor does it accept keyboard input when the virtual keyboard is forced open through third party app nor through a physical USB keyboard. Still more work to be done, but I’m shocked at how much is already possible!





  • I do tire of over and over explaining to vegans how the natural predation cycle works and that if aliens picked me up off the earth and promised to tend all my injuries and illnesses and give me all the food I could ask for in exchange for a slightly shorter than natural lifespan and as painless a death as they knew how to make it, I’d probably take them up on their offer.