Hasty Briefsbeta

Bilingual

Build Android apps using Rust and iced

4 months ago
  • #rust
  • #android
  • #iced
  • NativeActivity and GameActivity examples are available.
  • Examples include na-mainloop and andagdk-mainloop from android-activity, na-winit-wgpu from rust-android-examples, and iced integration example.
  • Most examples from iced can be run by omitting the scene rendering part and setting the background of the root container.
  • Text input has unresolved issues: window resizing on soft keyboard show/hide, changing input language of soft keyboard, and lack of IME support.
  • Copy/paste and show/hide soft keyboard functionality is implemented via Java calls.
  • Detailed instructions are available in the android-activity crate.
  • Setup involves setting ANDROID_NDK_HOME and ANDROID_HOME, adding the x86_64-linux-android target, and using cargo-ndk for building.
  • Test setup includes Arch Linux 6.9.6, JDK-OpenJDK 22, and target API 35.
  • android-activity enables building Android apps in Rust, with support from key crates like winit and wgpu.
  • iced doesn't natively support Android but can be integrated with existing graphics pipelines, as demonstrated in an example.