mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-15 11:08:55 +00:00
Update READMEs
This commit is contained in:
@@ -1,31 +1,22 @@
|
||||
This is a minimal test application similar to `agdk-mainloop` that
|
||||
is based on `NativeActivity` instead of `GameActivity`.
|
||||
|
||||
It shows how to run a mainloop based on `native_activity::poll_events()` and
|
||||
traces the events received without doing any rendering. It also saves and
|
||||
This is a minimal test application based on `NativeActivity` that just
|
||||
runs a mainloop based on android_activity::poll_events() and traces
|
||||
the events received without doing any rendering. It also saves and
|
||||
restores some minimal application state.
|
||||
|
||||
Since this test doesn't require a custom `Activity` subclass it's
|
||||
optionally possible to build this example with `cargo apk`.
|
||||
|
||||
The idea here is to test whether we can have a `NativeActivity` based
|
||||
glue layer which is API compatible with `game-activity`, which can
|
||||
optionally be used for _very_ basic tests/demos that want the convenience
|
||||
of not needing to compile any Java code.
|
||||
|
||||
# Gradle Build
|
||||
```
|
||||
rustup target add aarch64-linux-android
|
||||
export ANDROID_NDK_HOME="path/to/ndk"
|
||||
export ANDROID_HOME="path/to/sdk"
|
||||
|
||||
rustup target add aarch64-linux-android
|
||||
cargo install cargo-ndk
|
||||
|
||||
export ANDROID_NDK_HOME="path/to/ndk"
|
||||
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
|
||||
|
||||
export ANDROID_HOME="path/to/sdk"
|
||||
./gradlew build
|
||||
./gradlew installDebug
|
||||
adb shell am start -n co.realfit.namainloop/.MainActivity
|
||||
```
|
||||
|
||||
# Cargo APK Build
|
||||
@@ -33,7 +24,9 @@ adb shell am start -n co.realfit.namainloop/.MainActivity
|
||||
export ANDROID_NDK_HOME="path/to/ndk"
|
||||
export ANDROID_SDK_HOME="path/to/sdk"
|
||||
|
||||
rustup target add aarch64-linux-android
|
||||
cargo install cargo-apk
|
||||
|
||||
cargo apk build
|
||||
cargo apk run
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user