gio

command
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: CC0-1.0 Imports: 12 Imported by: 0

README

Gio + JNI Typed Wrappers

This example demonstrates using this library's typed JNI wrappers from within a Gio UI application. It reads Android device information (manufacturer, model, Android version) via the os/build package and displays it as text labels in a Gio layout.

What it shows

  • Bridging Gio's app.JavaVM() into this library via jni.VMFromUintptr
  • Calling typed wrappers (build.GetBuildInfo, build.GetVersionInfo) from a Gio event loop
  • Rendering JNI results in a Gio material-themed UI

Build

Install gogio (the Gio build tool):

go install gioui.org/cmd/gogio@latest

Build the APK:

gogio -target android -appid center.dx.jni.examples.gio .

Install on a connected device:

adb install -r gio.apk

Documentation

Overview

Command gio demonstrates using this library's typed JNI wrappers from within a Gio UI application. It reads Android build information via the build package and displays it as text labels.

Jump to

Keyboard shortcuts

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