Not thought through. For gobind-based apps, JNI_OnLoad is called and there is never any NativeActivity.
This reverts commit b781b80ee8.
Change-Id: Ib076f30d144cbacb7926d54981ac86bbb8a5a4ff
Reviewed-on: https://go-review.googlesource.com/4440
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
I am working on a virtual keyboard package that needs access to the
*ANativeActivity. As the *ANativeActivity contains *JavaVM, this CL
deprecates JavaInit. I'll remove it in a subsequent CL that updates
gobind to use RegisterAndroidInit.
Change-Id: Ib1d60bbaac5de4583b368c93ab90b764c6081291
Reviewed-on: https://go-review.googlesource.com/4400
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I879e51834726c8713c5befeb4be2e328d5295af4
Reviewed-on: https://go-review.googlesource.com/4110
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I792edeed6bf8309084281eebcdba7d4b6c6a0818
Reviewed-on: https://go-review.googlesource.com/4181
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Also s/bufer/buffer/ in comment for VertexAttribPointer.
Change-Id: Icb2ce35e4fed91939ebd00012e5caf88453fcbbf
Reviewed-on: https://go-review.googlesource.com/3959
Reviewed-by: David Crawshaw <crawshaw@golang.org>
The bindings are not working on Android currently. We may require
the users to build their own OpenAL library that is targetting
Android or may distribute a shared object.
Change-Id: Ibcfa3482aa53e9b3ec9bfddf5dd1622ad07b7b7e
Reviewed-on: https://go-review.googlesource.com/3115
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Files go in, a .apk file comes out. Effective testing depends
on the aapt tool being installed.
Change-Id: I10daaabe9090c10181d9a83b876a934d540023d3
Reviewed-on: https://go-review.googlesource.com/3049
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Does the equivalent of jarsigner for APKs.
Change-Id: Ie55ddb22ef9f56062034b091c9477fd9e9196310
Reviewed-on: https://go-review.googlesource.com/2904
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
They don't make sense for other platforms yet.
See golang/go#9603
Change-Id: I2ed269a00b1e1961aadf0a47fc95bbe3cd230113
Reviewed-on: https://go-review.googlesource.com/2902
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Change-Id: Ibbdd19990ecb64535baa55f81bbe7f2abcf118fd
Reviewed-on: https://go-review.googlesource.com/2653
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
When passing a byte array from Java to Go, Seq.writeByteArray JNI
call encodes only the array size and the pointer to the array.
Go-side receives the (size, ptr) pair info during the subsequent
Seq.send JNI call, and copies the elements into a Go byte slice.
We must pin the array elements until Go-side completes copying
so that they are not moved or collected by Java runtime.
This change keeps track of the pinned array info in a 'pinned' linked
list, and unpin them as the Seq memory is freed. The jbyteArray
argument passed to Seq.writeByteArray is needed to release the pinned
byte array elements, but that is a "local reference". It is not
guaranteed that the reference is valid after the method returns. Thus,
we stash its global reference in the 'pinned' list and delete it later
as well.
A similar problem can occur on the byte slice returned from a Go function.
This change does not address the case yet.
Fixesgolang/go#9486
Change-Id: I1255aefbc80b21ccbe9b2bf37699faaf0c5f0bae
Reviewed-on: https://go-review.googlesource.com/2586
Reviewed-by: David Crawshaw <crawshaw@golang.org>
If the volume is not accessible or -v option is not given,
docker run golang/mobile will fail with an error like:
finalize namespace chdir to /src/golang.org/x/mobile no such file or directory2015/01/13 20:14:19 Error response from daemon: Cannot start container dfe1dbc2bac3ea939e154eee13d20ecae4c473a595dbc1e6a0e5cf0be3963909: finalize namespace chdir to /src/golang.org/x/mobile no such file or directory
Change-Id: I4d56c044e9c7682e63da7170a546522230237b18
Reviewed-on: https://go-review.googlesource.com/2780
Reviewed-by: Burcu Dogan <jbd@google.com>
Change-Id: Ieac721b486155679f3de2baa13c69d50d63dce3b
Reviewed-on: https://go-review.googlesource.com/2652
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This initially supports reading two common system fonts. At some point
there should be a more general Open function, but first I need to work
out how to to turn font names into android file names.
Fixesgolang/go#9419.
Change-Id: I8321df873315a5222c39dccf961f742f2e2a7a4c
Reviewed-on: https://go-review.googlesource.com/2059
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This change makes gobind to generate proper Go-side proxy code to
handle interface methods that have parameters and return values.
It allows gobind to accept struct pointer types as parameters
or a return value of a method.
Fixesgolang/go#9487, golang/go#9488.
Change-Id: Id243c42ee0701d40e3871e392140368c2f8f9bc6
Reviewed-on: https://go-review.googlesource.com/2348
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Otherwise, successive adb installs will require the existing apk to be
removed. If no android.keystore is generated during docker build, one
will be generated by the NDK toolchain during docker run.
It will end up the applications are being signed with different
certificates on each docker run.
Fixes#9498.
Change-Id: Ibac202b828224287ec6fdc3eaff659de5fce61c3
Reviewed-on: https://go-review.googlesource.com/2266
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Add necessary files to build and run example/sprite.
Change main.go to get image from assets.
Change-Id: Ic3065aab97f59c34f2c0446ab4b46840305b5864
Reviewed-on: https://go-review.googlesource.com/1882
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Add windows batch files to build and run examples
Change-Id: I9102ceb5c47f692730a8b024648b1d10ff49b624
Reviewed-on: https://go-review.googlesource.com/1622
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Android delivers events in a batch. Previously, only the first event of the batch was passed to the Go callback, resulting in many events (typically corresponding to non-primary touches) being dropped.
Change-Id: I4b01bb6c4d1c88dec6c8fa379875043dfc0e9986
Reviewed-on: https://go-review.googlesource.com/1894
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Still working on how/when to call Stop.
Change-Id: Ice56c4c71ba351765657bb86dc01649c8238859e
Reviewed-on: https://go-review.googlesource.com/1885
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: If8ea6aaf2fb2c62eaf4119526a8bb46b8a84b982
Reviewed-on: https://go-review.googlesource.com/1881
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
android device.
It assumes it runs in golang.org/x/mobile repository.
This script copies the repository source tree into the connected device
and invokes go test that runs using the binary compiled from
go_android_exec.go. go_android_exec arranges to push and run the test
binary to the right place in the android device.
Change-Id: I4ac24bcfd8e26e01cccd3d7c2dddaf6b3c14951e
Reviewed-on: https://go-review.googlesource.com/1680
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Change-Id: I90a813c0823498297ff0bb7718bee6cd61b87581
Reviewed-on: https://go-review.googlesource.com/1517
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I73a6d37ecc1827fa65c94cd6d743874785f7e93a
Reviewed-on: https://go-review.googlesource.com/1374
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The new testLongString triggers the bug without this change.
Fixesgolang/go#9251.
Change-Id: I463e2897b5b08f53801f151c7311d591546c0719
Reviewed-on: https://go-review.googlesource.com/1373
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I4bf795cfe76daae9a922c671722db3e2fa44a0c0
Reviewed-on: https://go-review.googlesource.com/1320
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: Ibfdd36f306d9a52f226904aa99653dc1b932410b
Reviewed-on: https://go-review.googlesource.com/1289
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Some Android systems cannot read from /proc/self/auxv. Work around
this by creating a minimal fake auxv for the Go runtime.
Fixes#9229
Change-Id: Id2d743f43d91be23006aac708a5b5b5cd60a6dca
Reviewed-on: https://go-review.googlesource.com/1284
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: Icad6cb694b31924164483609e0fd9c7cce8e3f0d
Reviewed-on: https://go-review.googlesource.com/1185
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
C changes the types silently, so there's no need for the code to be
different (beyond the standard header ifdef boilerplate).
Change-Id: I0eddb5fa050c083cdac9db499634bf3d1bb9bb04
Reviewed-on: https://go-review.googlesource.com/1184
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I2ff85d2b4529fc12e08404c93266b827dd88b8ef
Reviewed-on: https://go-review.googlesource.com/1183
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>