gameactivity

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 0 Imported by: 0

README

GameActivity

This package provides Go bindings for the AGDK GameActivity C library.

GameActivity is an alternative to NativeActivity that provides:

  • Better input event handling with motion event batching
  • Text input support via GameTextInput
  • Modern lifecycle management built on AppCompatActivity

Prerequisites

GameActivity headers are not part of the standard Android NDK. To use this package:

  1. Download the games-activity AAR from Maven Central:

    https://maven.google.com/web/index.html#androidx.games:games-activity
    
  2. Extract the AAR (it's a ZIP file) and copy the C headers from prefab/modules/game-activity/include/ to gameactivity/include/.

  3. Copy the C source files from prefab/modules/game-activity/src/ to gameactivity/csrc/.

Alternatively, install the AGDK via Android Studio's SDK Manager.

Build tags

The Go source files use //go:build ignore until the AGDK headers are vendored into the include/ and csrc/ subdirectories. After vendoring, remove the build constraint to enable compilation.

Documentation

Overview

Package gameactivity provides Go bindings for the AGDK GameActivity C library.

GameActivity is a Jetpack library that replaces NativeActivity with improved input handling (motion event batching), text input support via GameTextInput, and modern lifecycle management built on AppCompatActivity.

This package requires AGDK GameActivity headers which are not part of the standard Android NDK. See README.md for setup instructions.

Jump to

Keyboard shortcuts

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