Open-Source Wikis

/

Bevy

/

Packages

/

bevy_android

bevyengine/bevy

bevy_android

Android-specific platform glue. A tiny crate that holds the AndroidApp handle and bridges Android's lifecycle to Bevy.

Purpose

When Bevy compiles for Android via cargo apk or the Gradle plugin, the entry point gets an AndroidApp handle from android-activity. bevy_android wraps that handle in a Bevy resource so other crates (bevy_winit, bevy_input, bevy_window) can read it.

Directory layout

crates/bevy_android/src/
└── lib.rs   # Single file: ANDROID_APP static, init function.

Key abstractions

Symbol File Description
ANDROID_APP crates/bevy_android/src/lib.rs Static cell holding the AndroidApp handle.
set_android_app crates/bevy_android/src/lib.rs Called once at startup by the platform shim.

Integration points

  • Depends on: android-activity.
  • Depended on by: bevy_internal (re-export), bevy_winit, bevy_audio.

Entry points for modification

  • Most platform integration lives in bevy_winit and the examples/mobile/ crate. This crate is just plumbing.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

bevy_android – Bevy wiki | Factory