10 Commits

Author SHA1 Message Date
Turtle Dove
372066e249 Android: Move JNI keyboard/clipboard into backend, add display metrics (#3446)
Backend improvements (imgui_impl_android.h/.cpp):
- Moved JNI soft-keyboard and Unicode char polling from the example into
  the backend. The application no longer needs any JNI boilerplate.
- Added clipboard support via JNI to Android ClipboardManager. (#7259)
- Added display metrics (DPI, density, refresh rate, orientation) via JNI.
  Used by the example to set main_scale from actual device density instead
  of hardcoded 2.0f.
- BREAKING CHANGE: ImGui_ImplAndroid_Init() now takes additional
  asset_manager and native_activity parameters. See before/after in header.

Example (main.cpp):
- Removed ShowSoftKeyboardInput() and PollUnicodeChars() JNI helpers (~120 lines).
- Removed their forward declarations and per-frame calls.
- Updated Init() call to new signature.
- Use ImGui_ImplAndroid_GetDisplayMetrics() for main_scale.
- All other comments, EGL block, GetAssetData, APP_CMD cases unchanged.

MainActivity.kt: unchanged (same 3 JNI bridge methods, now called by backend).

docs/CHANGELOG.txt: Added entries for backend and example changes.
2026-07-18 21:05:30 -05:00
ocornut
6824e2c2e4 Examples: Android: update to AGP 9.2.0 to support Gradle 9.6.0. 2026-07-02 14:26:46 +02:00
scribam
655601169b Examples: Android+OpenGL3: update Gradle project, amend. (#8888, #8878) 2025-08-19 15:20:53 +02:00
scribam
361e370fe0 Examples: Android+OpenGL3: update Gradle project (#8888, #8878) 2025-08-19 15:16:15 +02:00
Tygyh
a6bcbb173b
Examples: Android: Update kotlin version (#8409) 2025-02-20 18:07:25 +01:00
SPeak
1f634f1d94
Eaxmples: Android: Fix build failed issue. (#7832)
set android:exported to true (IntentFilter)

Signed-off-by: Sunrisepeak <speakshen@163.com>
2024-07-29 23:55:02 +02:00
duddel
57d0fcd021 Examples: Fix Android example build for Gradle 8. (#6229) 2023-03-07 14:01:20 +01:00
duddel
05a20ca738 Examples: Android: Make Android build compatible with Gradle 7.0. (#3446) 2021-04-15 12:36:06 +02:00
ocornut
8dd692c29c Android: Amend backend and examples with minor consistency tweaks. (#3446) 2021-03-04 11:07:03 +01:00
duddel
fb85c0341b
Add Android backend and example (#3446) 2021-03-04 10:35:44 +01:00