[mirror] Go on Mobile
Перейти к файлу
David Crawshaw 5c91e60c93 app: android activity lifecycle awareness
This CL fixes two bugs in the existing app implementation on android.
The first, is it assumed a single NativeActivity instance is created
per process. This is not true. If you open an app, hit the back
button, then open it again, the original activity is destroyed and a
new one is created. So only call main.main in the first onCreate.

The second bug has to do with window lifetimes. Previously we only
processed GL work while the window existed, as part of a paint cycle.
This missed GL events called as part of a lifecycle downgrade when
the window was destroyed. (I.e. the contents of onStop.) This CL
fixes this by making the main android event processing loop last for
the life of the process, not the window.

Fixes golang/go#11804.

Change-Id: Ia03e464aab5bc10ba75564b7ca11054515cda011
Reviewed-on: https://go-review.googlesource.com/12533
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-07-29 14:29:11 +00:00
app app: android activity lifecycle awareness 2015-07-29 14:29:11 +00:00
asset bind/java: reenable asset access. 2015-07-16 21:15:37 +00:00
bind bind: vendor x/tools/go/loader 2015-07-28 18:02:47 +00:00
cmd bind: vendor x/tools/go/loader 2015-07-28 18:02:47 +00:00
doc README.md: add caution. shorten the README.md. 2015-07-17 17:06:14 +00:00
event event/config: specify width and height in both pixels and points. 2015-07-28 01:48:05 +00:00
example example: limit examples build to linux or darwin. 2015-07-28 16:32:30 +00:00
exp exp/sprite/portable: update for x/image/draw API change. 2015-07-29 01:18:55 +00:00
geom app: use one thread for both GL and other UI C code. 2015-06-26 07:43:17 +00:00
gl gl/glutil: move to exp/gl/glutil. 2015-07-01 11:41:50 +00:00
internal bind: vendor x/tools/go/loader 2015-07-28 18:02:47 +00:00
misc/androidstudio misc/androidstudio: source code for gomobile bind gradle plugin. 2015-07-22 22:16:26 +00:00
testdata example/sprite: make example lives 2014-12-22 13:10:48 +00:00
.gitattributes mobile: copying .gitattributes to all subrepositories 2014-12-23 23:23:25 +00:00
.gitignore gitignore: add apk and app to the ignore list 2015-06-30 15:15:53 +00:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTING.md doc: add CONTRIBUTING.md 2015-02-18 23:42:31 +00:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05: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: add caution. shorten the README.md. 2015-07-17 17:06:14 +00:00
codereview.cfg mobile: add codereview.cfg 2015-03-18 17:03:44 +00:00

README.md

Go support for Mobile devices

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

Package documentation serves as a starting point:

Caution image

The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.

This is early work and installing the build system requires Go 1.5. Follow the build instructions on godoc.org/golang.org/x/mobile/cmd/gomobile to install the gomobile command and build the basic example.

--

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