You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a egui project that uses winit and the GameActivity based android-activity backend. I tried to get the android version of wry working in my winit project but unfortunately I didn't succeed.
From the readme it sounds like in theory it should be possible to use wry on android without tao, but it's not really explained how it would work.
I guess the big question is how I would call wry::android_setup()?
I guess the JNIEnv maybe could be constructed from vm_as_ptr?
Same for the activity, activity_as_ptr?
But how would I create the foreign looper?
I also tried creating a tao and a winit instance in parallel, by making the WryActivity extend GameActivity, but then I got a error from ndk-context:
ndk-context-0.1.1/src/lib.rs:87:5:
assertion failed: previous.is_none()
I guess because both winit and tao try to initialize ndk-context.
Describe the solution you'd like
Support to use wry with winit on android, and better documentation how it would be done.
Describe alternatives you've considered
I guess an alternative for me would be to just use tao on android and use it together with https://crates.io/crates/eframe_tao, but I'd prefer to stay with winit since I'm using it with every other platform.
The text was updated successfully, but these errors were encountered:
I did a bit of experimenting with android-activity's GameActivity last week and I got it to work but only If invoke the setup function for WRY in Java code after initialization, AndroidApp::vm_as_ptr and AndroidApp::activity_as_ptr also seem promising, but didn't have luck with it, just yet, not sure if I can work on it again soon.
Here is a simple PoC that I got working so far if anyone wants to continue research, first add this function in your Rust (notice that function name must contain your android domain and package name)
Is your feature request related to a problem? Please describe.
I have a egui project that uses winit and the GameActivity based android-activity backend. I tried to get the android version of wry working in my winit project but unfortunately I didn't succeed.
From the readme it sounds like in theory it should be possible to use wry on android without tao, but it's not really explained how it would work.
I guess the big question is how I would call wry::android_setup()?
I guess the JNIEnv maybe could be constructed from vm_as_ptr?
Same for the activity, activity_as_ptr?
But how would I create the foreign looper?
I also tried creating a tao and a winit instance in parallel, by making the WryActivity extend GameActivity, but then I got a error from ndk-context:
ndk-context-0.1.1/src/lib.rs:87:5:
assertion failed: previous.is_none()
I guess because both winit and tao try to initialize ndk-context.
Describe the solution you'd like
Support to use wry with winit on android, and better documentation how it would be done.
Describe alternatives you've considered
I guess an alternative for me would be to just use tao on android and use it together with https://crates.io/crates/eframe_tao, but I'd prefer to stay with winit since I'm using it with every other platform.
The text was updated successfully, but these errors were encountered: