-
Notifications
You must be signed in to change notification settings - Fork 121
Description
I was wondering if anyone here has investigated building Rust apps base on Google's newer GameActivity which looks like it can be viewed as a more feature-full NativeActivity which provides more C/C++ native bindings / glue for things like input/IME and controllers.
Ref: https://android-developers.googleblog.com/2021/07/introducing-android-game-development-kit.html
GameActivity is also notably based on AppCompatActivity that itself should offer improved compatibility across different versions of Android.
Also ref this overview blog post: https://medium.com/kayvan-kaseb/using-c-c-libraries-for-android-game-development-63fad09e0711
On a related note I'm currently unsure how heavily tied android-ndk-rs is to NativeActivity.
Right now I'm writing a Rust library that interacts with Bluetooth on Android where I need to have my own subclass of Activity for being able to use Activity::startIntentSenderForResult and override onActivityResult. (The way Android's Bluetooth Companion API works is via an Intent that sends back a result when the user chooses a device)
Right now I'm testing my library with a simple test application but I was also hoping to be able to build a Bevy or egui application using winit based on a subclass of GameActivity.
Starting to poke around winit and seeing how it depends on android-ndk-rs I'm a bit unsure how heavily these things are currently tied to NativeActivity and also tools like cargo ndk/cargo apk (I'm currently using rust-android-gradle )
Sorry the issue conflates a few questions. Besides raising the idea as a kind of feature request, I'm also hoping someone familiar with android-ndk-rs might be able to highlight any particular issues I might expect to hit if I were to try and plough ahead with making a GameActivity based app that used winit and probably egui to start with. In case I did go ahead any get something working it would also be interesting to hear if there would be any interest in accepting changes to support alternative Activity subclasses.