[mirror] Go on Mobile https://golang.org/x/mobile
Go to file
David Crawshaw 6cf9d880ce bind/java: ensure there is enough capacity for writing seq
The new testLongString triggers the bug without this change.

Fixes golang/go#9251.

Change-Id: I463e2897b5b08f53801f151c7311d591546c0719
Reviewed-on: https://go-review.googlesource.com/1373
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2014-12-11 17:53:23 +00:00
app all: update docs to remove code.google.com 2014-12-11 14:15:30 +00:00
bind bind/java: ensure there is enough capacity for writing seq 2014-12-11 17:53:23 +00:00
cmd/gobind all: update docs to remove code.google.com 2014-12-11 14:15:30 +00:00
event mobile: add import comments. 2014-12-10 01:59:04 +00:00
example all: update docs to remove code.google.com 2014-12-11 14:15:30 +00:00
f32 mobile: add import comments. 2014-12-10 01:59:04 +00:00
geom mobile: add import comments. 2014-12-10 01:59:04 +00:00
gl mobile: add import comments. 2014-12-10 01:59:04 +00:00
sprite all: update docs to remove code.google.com 2014-12-11 14:15:30 +00:00
testdata go.mobile/sprite/glsprite: first cut of a glsprite Engine. 2014-11-11 09:39:37 +11:00
.gitignore convert .hgignore to .gitignore. 2014-12-08 10:43:03 +11:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
Dockerfile Dockerfile: update to download go from git and utilize volume mount. 2014-12-10 20:28:06 +00:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README.md README.md: rewrite to describe Dockerfile builds 2014-12-10 18:57:44 +00:00

README.md

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on Android.

This is early work and the build system is a bumpy ride. Building a binary for Android requires using a Go cross compiler and an external linker from the NDK.

For now, the easiest way to setup a build environment is using the provided Dockerfile:

go get -d golang.org/x/mobile/...
docker build -t mobile $GOPATH/src/golang.org/x/mobile

In your app directory under your $GOPATH, copy the following files from either the golang.org/x/mobile/basic or golang.org/x/mobile/libhello apps:

AndroidManifest.xml
all.bash
build.xml
jni/Android.mk
make.bash

Start with basic if you are writing an all-Go application (that is, an OpenGL game) or libhello if you are building a .so file for use from Java via gobind. Edit the files to change the name of your app.

To build, run:

docker run -v $GOPATH/src:/src mobile /bin/bash -c 'cd /src/your/project && ./make.bash'

When working with an all-Go application, this will produce a binary at $GOPATH/src/your/project/bin/name-debug.apk. You can use the adb tool to install and run this app. See all.bash for an example.

--

APIs are currently very limited, but under active development. Package documentation serves as a starting point:

Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.