robius-android-env
This crate provides easy Rust access to Android state (native Java objects) managed by UI toolkits.
This crate exists for two kinds of downstream users:
set_vm()
and set_activity_getter()
functions.makepad
Cargo feature. ndk_context
Cargo feature.⚠️ Note: for wider compatibility, you should prefer the
ndk-context
feature instead of what is described below.
For any other UI toolkits not listed above, you don't need to enable any cargo features. Instead, your application code must manually provide two key states:
This can be achieved by doing the following:
set_activity_getter()
.JNIEnv
object,
the application must also call the set_vm()
function.