Bindings for Android ndk, generated with nswrap
Go to file
Greg f5a3da4398 Working version which returns data via Go channels after waiting for
all user interactions to complete successfully. Streamline code and
eliminating PgpFragment (make PgpConnect itself a Fragment).
2019-11-15 20:17:43 -05:00
android27 Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
android28 Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
android29 Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
examples Working version which returns data via Go channels after waiting for 2019-11-15 20:17:43 -05:00
.gitignore Working version of pgp example before restructuring. 2019-11-15 15:45:32 -05:00
android27.yaml Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
android28.yaml Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
android29.yaml Update to newer nswrap, gogio. 2019-10-07 10:41:51 -04:00
go.mod Update Gio version. 2019-11-01 14:21:44 -04:00
go.sum Update Gio version. 2019-11-01 14:21:44 -04:00
README.md Add JNI example. 2019-10-18 14:40:35 -04:00

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.