Bindings for Android ndk, generated with nswrap
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Greg 1e65963bd4 Bump gio version. Add examples/fragment 1 year ago
android27 Add bouncing ball and acceleration sensor to examples/sensors 1 year ago
android28 Add bouncing ball and acceleration sensor to examples/sensors 1 year ago
android29 Add bouncing ball and acceleration sensor to examples/sensors 1 year ago
examples Bump gio version. Add examples/fragment 1 year ago
.gitignore Working version of pgp example before restructuring. 2 years ago
README.md Add JNI example. 2 years ago
android27.yaml Update to newer nswrap, gogio. 2 years ago
android28.yaml Update to newer nswrap, gogio. 2 years ago
android29.yaml Update to newer nswrap, gogio. 2 years ago
go.mod Bump gio version. Add examples/fragment 1 year ago
go.sum Bump gio version. Add examples/fragment 1 year ago

README.md

android-go

Bindings for Android ndk, generated with nswrap. An example app is included in examples/sensors. To try it on your Android device:

go install gioui.org/cmd/gogio
go get git.wow.st/gmp/android-go/examples/sensors
cd $GOPATH/src/git.wow.st/gmp/android-go/examples/sensors
gogio -target android -minsdk 27 .
adb install -r sensors.apk

There is also an example showing how to incorporate custom Java classes and access them (and the rest of the Android system) via JNI. To build it (on a Unix-like environment):

go get git.wow.st/gmp/android-go/examples/jni
cd $GOPATH/src/git.wow.st/gmp/android-go/examples/jni
go generate os_android.go
gogio -target android -minsdk 27 .
adb install -r jni.apk

To build on Windows, you will need to re-write the go:generate commands at the top of os_android.go as appropriate.