Skip to content

Android

Android support targets API 23 and later. Generated projects use a Gradle build with the HuxerUI library module and an application module; the library links the Android HuxerUI shared library while application C++ remains in the generated source tree.

Terminal window
huxerui setup android
huxerui run android

The host view owns one shared runtime and adapter. Java/Kotlin lifecycle, input method, accessibility node provider, file picker, HTTP transport, and system bars cross the JNI boundary into shared C++ behavior. Keep app UI code platform-neutral and add Android-specific factories through typed RootContext registration.

Android defaults to safe-area content. Choose WindowContentMode::EdgeToEdge to draw behind system bars, then use SafeAreaPadding and SystemBarsAppearance. Software-keyboard viewport adjustment is distinct from physical safe-area insets.

PlatformView factories are declared by <huxerui/android/platform_registry.h>. External texture sources use <huxerui/android/external_texture.h>. JNI work must run on the UI thread and respect Java reference lifetime.

Android behavior must still be validated on devices or emulators for API level, density, system-bar mode, IME resize policy, accessibility service, document provider, and network security configuration.

Local notifications require application channel/icon metadata, a channel on API 26+, and notification permission for API 33+. Durable scheduling needs the explicit non-exported receiver; custom RemoteViews templates need an application layout provider on API 24+. Permissions and channel policy can suppress accepted delivery.

See Local notifications for shared usage and platform configuration, and System API for exact contracts.