mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-12 17:48:55 +00:00
ecd03edb1a
Based on the android example that's in the cpal repo, this test plays a 440hz sine wave and is based on GameActivity Note: this requires a workaround branch for cpal that comments out a dev-dependency on ndk-glue that cpal has for its android example. This is needed because Cargo is spuriously propagating this dev dependency outside of the cpal package (which leads to a crash)
486 B
486 B
This is a minimal test application based on GameActivity that just
runs a mainloop based on android_activity::poll_events() and plays a
sine wave audio test using the Cpal audio library.
export ANDROID_NDK_HOME="path/to/ndk"
export ANDROID_HOME="path/to/sdk"
rustup target add aarch64-linux-android
cargo install cargo-ndk
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
./gradlew build
./gradlew installDebug
adb shell am start -n co.realfit.agdkcpal/.MainActivity