can already tell android dev is going to be a pain in the ass. On my pixel phone when i tap ‘a’ it sends two ‘a’s. on my galaxy tablet it sends one. Exact same code.

I’m logging at the lowest levels, directly from the native GameActivity apis.

All i’m doing is registering a callback for when there is text input. GameActivity calls me twice when i press a key, first with an ‘a’ and then again with ‘aa’. ahhh. not even ai is helping with this one.

I guess next step is to look at the android source code to see why this is happening. At least it’s cool you can do that. but still 😩 nostr:note1rh933wgf99qf3v7r4sl9p93jh9xl45kygqzy6thau93wyy0m2mss23er04

Reply to this note

Please Login to reply.

Discussion

It's pretty insane that getting a keyboard to work is this big of a challenge!! Are you in such uncharted territory using rust on android or something? Have some satcompassion 😄

yeah its just me and lucasmerlin from egui who has tackled this problem. I have successfully*ish* hooked up text input from GameActivity (android-activity) to winit to egui.

Once i fix these remaining issues i can start to try to upstream this stuff. Once i do egui will start to be a more serious option for mobile cross platform dev.

This is pretty huge because there are not many immediate mode non-web rust app dev frameworks that are truly cross platform.

Having it in winit will mean any app framework that uses winit to manage its windowing will have input from android and ios as well. This is surprisingly still not supported.

Keep in mind every keyboard on Android works differently. They all have their own kinks.

lovely

Yes ... OpenBoard in Amethyst deletes spaces before words when you type back .. back .. back ..

yes *U* R*/*

I think that is why most game ports from desktop avoid the default on screen keyboard all together. It's easier to just not deal with it.

We were using NativeActivity but was told it was deprecated and they keyboard wasn’t appearing at all 😵‍💫

Yeah, since the migration to Compose, most of Android is not developed based on Activities anymore. Activities are still required, but only because of backward compatibility. If it were for the Compose/Kotlin team, which is now the default way of doing Android, Activities would have been long gone (like... 6 years ago).

ah interesting, good to know

So GameActivity seems like a safe haven for now at least, assuming most game engines target that

Yeah, GameActivity is somewhat integrated into the Compose ecosystem because it is technically part of the Jetpack libs (the Kotlin guys)

prev. note waz ref. 2 pow NA o_0 a tu linda*/*

<*BrO*>

The joys of hardware and os level customization fragmentation.

I have friends who do gamedev and in 2025 it's still something with "gotta do this if amd" or "gotta do that if nvidia" and then there's also different driver versions and some 100 cards that are 'common' and should maybe be taken into account.

oh yeah thank god for wgpu. I don’t want to deal with that

You caan figure it out. We haave faaith in you!

We should have kept physical keyboards on phones I guess 😂 I think it would be helpful if we had keyboard standards at least. Maybe it's fair to build to the standard AOSP apps and let the third party keyboard apps follow that standard or just be broken.

What I don't understand is why these issues only come up with Nostr clients for me. I've never had this issue since the beginning of Android.

new tek carz+ suk2

There’s always issues, some nostr devs work in the open so you get to see how the sausage is made, users are QA, etc. all these issues are usually in resolved in big companies before people ever see them.

Software isn’t magic. It’s lots of grinding and polish to get something that just works.

Yeah, I can appreciate that. I built android apps years ago and don't recall it being an issue. In fairness, we didn't really have many other keyboards to worry about. I'm sure there's a lot more shit in the soup these days.

BRING THE PHYSICAL CHICLET KEYBOARDS BACK

Better you than me🤣

You’re the goat Will. Your progeny will be proud of what you did for nostr and freedom.

Courage ! This will be a game changer , incoming 6000 downloads/ week 🤞🤞🤞