v0.0.0-...-fd97e0e Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, BSD-3-Clause Imports: 6 Imported by: 0



An app that paints green if is reachable when the app first starts, or red otherwise.

In order to access the network from the Android app, its AndroidManifest.xml file must include the permission to access the network.

The gomobile tool auto-generates a default AndroidManifest file by default unless the package directory contains the AndroidManifest.xml. Users can customize app behavior, such as permissions and app name, by providing the AndroidManifest file. This is irrelevent to iOS.

Note: This demo is an early preview of Go 1.5. In order to build this program as an Android APK using the gomobile tool.

See to install gomobile.

Get the network example and use gomobile to build or install it on your device.

$ go get -d
$ gomobile build # will build an APK

# plug your Android device to your computer or start an Android emulator.
# if you have adb installed on your machine, use gomobile install to
# build and deploy the APK to an Android target.
$ gomobile install

Switch to your device or emulator to start the network application from the launcher. You can also run the application on your desktop by running the command below. (Note: It currently doesn't work on Windows.)

$ go install && network

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL