Apply the makepad_test workstream onto the fork's portallist pin:
- makepad_test: runtime support for terminal (standalone) + Android (adb) runners,
dropping the Studio-hub-only requirement for headless UI tests
- platform: native_activity Android path (looper_wrapper.c, android_native.rs,
android_jni_native.rs), standalone terminal app_main path
- cargo-makepad: native_activity + profile-dependent prefer-dynamic in android
build; keystore-create/build-aab packaging inputs
- studio hub: standalone hub_server binary for headless run
- examples/counter: terminal UI test entry (wait_text/click via Selector) ready
for Android + desktop parity
Base: fork portallist_flow_adaptive_view
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
makepad-android-state
This crate is responsible for holding Makepad's Android-specific context states. It exists solely to allow external crates to access those Android states without depending on the entirety of Makepad.
These two states are:
- The JavaVM instance initialized by the JNI layer.
- This cannot be set by foreign code outside this crate, as it is only ever set once during the lifetime of the app process.
- The current Makepad Activity instance.
- This can be set by foreign code outside this crate, as the underlying Android platform may tear down and reconstruct the activity instance multiple times during the app's lifetime.
- However, for safety reasons, we only permit a single caller to obtain the private "set_activity" function, which ensures that only the internal Makepad framework can set the activity instance.
Usage
Note: you probably want to use the
robius-android-envcrate instead of using this crate directly, or an even higher-level crate that depends onrobius-android-env.
External users of this crate should only care about two functions:
get_java_vm(): returns a pointer to the JavaVM instance, through which you can obtain the JNI environment.get_activity(): returns a pointer to the current Makepad Activity instance.
All other functions are intended for Makepad-internal use only, and will not be useful for external users.