Since f24606cc84 in android-ndk-rs then NativeWindow now implements
Clone and Drop which was technically a breaking change since it
changed the ownership contract for existing users of
NativeWindow::from_ptr().
We now use NativeWindow::clone_from_ptr() to account for the fact that
the window will be unconditionally _released() when NativeWindow gets
dropped.
This addresses a crash I was debugging with the Cpal and Oboe
examples which turned out to be nothing to do with the examples
themselves.
This fixes build errors about not specifying either of the
"native-activity" or "game-activity" features.
The issue came about because the in-tree examples want to
build against the in-tree version of android-activity located
with a relative `path = ` but these particular examples
depend on Winit which would resolve a second implementation
of android-activity, via a github url - where Cargo will treat
them as completely different crates.
"native-activity" builds were recently broken by bb8eeb705c which
this patch fixes.
The na-mainloop example has also been updated to verify this by
reducing the fake "render" timeout and also triggering a fake
render when an InputAvailable event is received.
Fixes: #12
This reinstates support for notifying applications of new input events
without requiring them to always check for input as part of their
rendering updates. This makes it possible to build UI applications that
might only need to redraw in response to new input.
For now GameActivity doesn't emit this event but the plan is to also
add support for this in GameActivity.
Addresses: #4
This general Activity glue crate now supersedes the two separate
native-activity and game-activity crates.
The adds the functionality of both crates as modules within this
new crate but provides a single crate + API that downstream can
depend on as an Activity glue layer.
The new crate exposes two (mutually-exclusive) features for
choosing which Activity backend to build:
* "native-activity"
* "game-activity"
This common crate makes it more practical to write code that's
Activity agnostic.
android_main() now takes an `app: AndroidApp` argument and has an
extern "Rust" ABI instead of "C" ABI.
This should help make it possible to run multiple native Activities in a
single process.