| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Go Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style | |
| 3 // license that can be found in the LICENSE file. | |
| 4 | |
| 5 /* | |
| 6 This example program compiles to a gojni.so shared library, that can | |
| 7 be loaded from an android application. Build it by configuring a cross | |
| 8 compiler (see go.mobile/README) and then running: | |
| 9 | |
| 10 ANDROID_APP=/path/to/Myapp/app ./make.bash | |
| 11 | |
| 12 This program expects app/Go.java to be included in the Android | |
| 13 project, along with a Java class named Demo defining | |
| 14 | |
| 15 public static native void hello(); | |
| 16 | |
| 17 calling hello prints "Hello, world!" to logcat. | |
| 18 | |
| 19 This is a very early example program that does not represent the | |
| 20 intended development model for Go on Android. A language binding | |
| 21 generator will follow, as will gradle build system integration. | |
| 22 The result will be no make.bash, and no need to write C. | |
| 23 */ | |
| 24 package main | |
| 25 | |
| 26 import "golang.org/x/mobile/app" | |
| 27 | |
| 28 func main() { | |
| 29 app.Run(app.Callbacks{}) | |
| 30 } | |
| OLD | NEW |