rust-mobile / rust-android-examples

Various standalone Rust Android examples
112 stars 21 forks source link

Update all of the examples #4

Closed rib closed 1 year ago

rib commented 1 year ago

Since I was looking at hopefully spinning an android-activity release soon, I wanted to update these examples and also take the opportunity to test them against android-activity main.

For each example, this:

This also adds a na-egui example that tests NativeActivity + Egui (same code as agdk-egui, but built against NativeActivity instead of GameActivity)

This also fixes *-mainloop on newer versions of Android by posting dummy frames to unblock input.

Newer versions of Android will stop delivering input to applications that don't appear to be responsive because they aren't rendering anything. This updates na-mainloop and agdk-mainloop so that they at least do a NOOP post of an untouched framebuffer each frame, so that they continue to be delivered touch input.

.github/workflows/ci.yml has been updated to ensure all the examples are built now, and ./gradlew build is run, in addition to cargo ndk build