16 Commits

Author SHA1 Message Date
Robert Bragg dd66428b14 Update README.md
This tries to refresh some of the information in the README, providing
some more clarity on what version of the GameActivity Jetpack library is
required (if using the game-activity backend) and removing the older
information about how to port crates from ndk-glue to android-activity.
2026-03-23 15:50:43 +00:00
Robert Bragg c1d00b9191 Support an optional 'android_on_create' entrypoint
This adds support for an optional `android_on_crate` entrypoint which is
called from within the Activity.onCreate native method callback from the
Java main / UI thread.

This gives applications an opportunity initialize state while the
`Activity`'s class loader is on the stack, so `FindClass` will be able
to find application classes.

This can be a more-convenient place to initialize JNI bindings, without
needing to explicitly get the class loader from the Activity to be able
to look up application classes from the android_main thread.

This may also be convenient for initially using JNI to interact with
your new Activity in case you need to use SDK APIs that are only safe to
use from the Java main / UI thread.

The moves the thread initialization functions out of util.rs into a new
init.rs

While adding documentation for this feature, this also does a
more-general pass over the top-level crate documentation to try and
ensure it's up-to-date.

Fixes: #169
Addresses: #82
2026-03-19 16:33:15 +00:00
Alex Touchet 4e93184d8b Update Readme links 2026-02-18 03:07:36 +00:00
Alex Touchet 31feb32f07 Update MSRV badge in Readme 2026-02-17 23:54:39 +00:00
Marijn Suijten e14d2c1deb README: Fix MSRV badge 2023-11-04 22:40:15 +01:00
Marijn Suijten 100d5bc1d4 README: Update crate version in Cargo.toml example 2023-10-28 20:25:08 +02:00
Marijn Suijten 4a4efd871a README: Add badges to CI, crates.io, docs.rs and show the MSRV
I was trying to quickly get to the documentation of this crate and had
the GitHub page open... but there was no link on the front-page: let's
fix that.
2023-06-16 17:37:41 +02:00
Robert Bragg 1b44d38822 Bump MSRV to 0.64 and and MSRV policy to README 2023-04-23 15:57:07 +01:00
Robert Bragg 4155fbc9db README: update example links 2022-12-21 23:27:09 +00:00
Robert Bragg 9640893477 Update README 2022-11-13 15:15:24 +00:00
Robert Bragg aa5fcc53bb Improve docs
This removes the indirection of the `StateSaver` and `StateLoader`
type aliases (which resulted in no documentation for these interfaces)
and we now simply re-export the types from the backend implementation.
2022-11-11 20:44:18 +00:00
Robert Bragg 1ece2ad87d Update README.md
Update example (copy from na-mainloop)
2022-10-18 19:38:22 +01:00
Marijn Suijten b717c03dda Update README.md 2022-09-20 03:24:00 +01:00
Robert Bragg b63b5e15fa Update READMEs 2022-07-03 23:34:25 +01:00
Robert Bragg d929a88468 README: add adb logcat command to initial example 2022-05-25 22:30:23 +01:00
Robert Bragg 4f8227b5ba Add an initial top-level README 2022-05-25 20:19:34 +01:00