The State can be used in the Start callback (and lazily-initialized packages) instead of JavaInit. This stores a reference to the android.context.Context for the (future) keyboard package and for setting TMPDIR. Second attempt at https://golang.org/cl/4400. Change-Id: I673997b26ab25ce5140cb31950593d8c6dbd9c51 Reviewed-on: https://go-review.googlesource.com/5555 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
19 lines
376 B
Go
19 lines
376 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//+build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"golang.org/x/mobile/app"
|
|
"golang.org/x/mobile/bind/java"
|
|
|
|
_ "golang.org/x/mobile/bind/java/testpkg/go_testpkg"
|
|
)
|
|
|
|
func main() {
|
|
app.Run(app.Callbacks{Start: java.Init})
|
|
}
|