jni

package module
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: 9 Imported by: 0

README ¶

jni

Go Reference Go Report Card Go Version Ask AI

Idiomatic Go bindings for the Java Native Interface and 53 Android Java API packages, auto-generated from YAML specs to ensure full coverage and easy maintenance.

For remote Android API access over gRPC, see jni-proxy.

Android Interfaces for Go

This project is part of a family of three Go libraries that cover the major Android interface surfaces. Each wraps a different layer of the Android platform:

graph TD
    subgraph "Go application"
        GO["Go code"]
    end

    subgraph "Interface libraries"
        NDK["<b>ndk</b><br/>C API bindings via cgo"]
        JNI["<b>jni</b><br/>Java API bindings via JNI+cgo"]
        AIDL["<b>binder</b><br/>Binder IPC, pure Go"]
    end

    subgraph "Android platform"
        CAPI["NDK C libraries<br/>(libcamera2ndk, libaaudio,<br/>libEGL, libvulkan, ...)"]
        JAVA["Java SDK<br/>(android.bluetooth,<br/>android.location, ...)"]
        BINDER["/dev/binder<br/>kernel driver"]
        SYSSVCS["System services<br/>(ActivityManager,<br/>PowerManager, ...)"]
    end

    GO --> NDK
    GO --> JNI
    GO --> AIDL

    NDK -- "cgo / #include" --> CAPI
    JNI -- "cgo / JNIEnv*" --> JAVA
    AIDL -- "ioctl syscalls" --> BINDER
    BINDER --> SYSSVCS
    JAVA -. "internally uses" .-> BINDER
    CAPI -. "some use" .-> BINDER
Library Interface Requires Best for
ndk Android NDK C APIs cgo + NDK toolchain High-performance hardware access: camera, audio, sensors, OpenGL/Vulkan, media codecs
jni (this project) Java Android SDK via JNI cgo + JNI + JVM/ART Java-only APIs with no NDK equivalent: Bluetooth, WiFi, NFC, location, telephony, content providers
binder Binder IPC (system services) pure Go (no cgo) Direct system service calls without Java: works on non-Android Linux with binder, minimal footprint
When to use which
  • Start with ndk when the NDK provides a C API for what you need (camera, audio, sensors, EGL/Vulkan, media codecs). These are the lowest-latency, lowest-overhead bindings since they go straight from Go to the C library via cgo.

  • Use jni when you need a Java Android SDK API that the NDK does not expose. Examples: Bluetooth discovery, WiFi P2P, NFC tag reading, location services, telephony, content providers, notifications. JNI is also the right choice when you need to interact with Java components (Activities, Services, BroadcastReceivers) or when you need the gRPC remote-access layer.

  • Use binder when you want pure-Go access to Android system services without any cgo dependency. This is ideal for lightweight tools, CLI programs, or scenarios where you want to talk to the binder driver from a non-Android Linux system. AIDL covers the same system services that Java SDK wraps (ActivityManager, PowerManager, etc.) but at the wire-protocol level.

  • Combine them when your application needs multiple layers. For example, a streaming app might use ndk for camera capture and audio encoding, jni for Bluetooth controller discovery, and binder for querying battery status from a companion daemon.

How they relate to each other

All three libraries talk to the same Android system services, but through different paths:

  • The NDK C APIs are provided by Google as stable C interfaces to Android platform features. Some (camera, sensors, audio) internally use binder IPC to talk to system services; others (EGL, Vulkan, OpenGL) talk directly to kernel drivers. The ndk library wraps these C APIs via cgo.
  • The Java SDK uses binder IPC internally for system service access (BluetoothManager, LocationManager, etc.), routing calls through the Android Runtime (ART/Dalvik). The jni library calls into these Java APIs via the JNI C interface and cgo.
  • The AIDL binder protocol is the underlying IPC mechanism that system-facing NDK and Java SDK APIs use. The binder library implements this protocol directly in pure Go, bypassing both C and Java layers entirely.

Usage Examples

Bluetooth
import "github.com/AndroidGoLab/jni/bluetooth"

    adapter, _ := bluetooth.NewAdapter(ctx)
    defer adapter.Close()

    enabled, _ := adapter.IsEnabled()
    name, _ := adapter.GetName()
    addr, _ := adapter.GetAddress()
    fmt.Printf("Bluetooth: %s (%s), enabled=%v\n", name, addr, enabled)
Location
import "github.com/AndroidGoLab/jni/location"

    mgr, _ := location.NewManager(ctx)
    defer mgr.Close()

    locObj, _ := mgr.GetLastKnownLocation(location.GpsProvider)
    fmt.Printf("Location: %v\n", locObj)
WiFi
import "github.com/AndroidGoLab/jni/net/wifi"

    mgr, _ := wifi.NewManager(ctx)
    defer mgr.Close()

    enabled, _ := mgr.IsWifiEnabled()
    fmt.Println("WiFi enabled:", enabled)
Notifications
import "github.com/AndroidGoLab/jni/app/notification"

    mgr, _ := notification.NewManager(ctx)
    defer mgr.Close()

    ch, _ := notification.NewChannel(vm, "alerts", "Alerts",
        int32(notification.ImportanceHigh))
    mgr.CreateNotificationChannel(ch.Obj)

    b, _ := notification.NewBuilder(vm, appCtx, "alerts")
    b.SetSmallIcon1_1(iconResID)
    b.SetContentTitle("Hello from Go!")
    b.SetContentText("Posted via JNI — no Java code")
    notif, _ := b.Build()
    mgr.Notify2(1, notif)
Running Examples

All 53 examples are self-contained NativeActivity apps — zero Java code. Each lives in examples/<name>/ with its own Makefile:

cd examples/alarm
make run          # build APK → install → grant permissions → launch

Build and install all examples at once from the repo root:

make examples     # builds all 53 APKs

See examples/ for the full list.

Supported Packages

53 Android API packages organized in a Java SDK-mirroring hierarchy:

Android API Go Package Import Path
Application Framework
app app github.com/AndroidGoLab/jni/app
alarm alarm github.com/AndroidGoLab/jni/app/alarm
download download github.com/AndroidGoLab/jni/app/download
job job github.com/AndroidGoLab/jni/app/job
notification notification github.com/AndroidGoLab/jni/app/notification
usage usage github.com/AndroidGoLab/jni/app/usage
accounts accounts github.com/AndroidGoLab/jni/accounts
Bluetooth
bluetooth bluetooth github.com/AndroidGoLab/jni/bluetooth
Content & Storage
clipboard clipboard github.com/AndroidGoLab/jni/content/clipboard
pm pm github.com/AndroidGoLab/jni/content/pm
preferences preferences github.com/AndroidGoLab/jni/content/preferences
resolver resolver github.com/AndroidGoLab/jni/content/resolver
permission permission github.com/AndroidGoLab/jni/content/permission
Graphics
pdf pdf github.com/AndroidGoLab/jni/graphics/pdf
Hardware
biometric biometric github.com/AndroidGoLab/jni/hardware/biometric
camera camera github.com/AndroidGoLab/jni/hardware/camera
ir ir github.com/AndroidGoLab/jni/hardware/ir
lights lights github.com/AndroidGoLab/jni/hardware/lights
usb usb github.com/AndroidGoLab/jni/hardware/usb
Health
health connect github.com/AndroidGoLab/jni/health/connect
Location
location location github.com/AndroidGoLab/jni/location
Media
audiomanager audiomanager github.com/AndroidGoLab/jni/media/audiomanager
player player github.com/AndroidGoLab/jni/media/player
projection projection github.com/AndroidGoLab/jni/media/projection
recorder recorder github.com/AndroidGoLab/jni/media/recorder
session session github.com/AndroidGoLab/jni/media/session
Networking
net net github.com/AndroidGoLab/jni/net
nsd nsd github.com/AndroidGoLab/jni/net/nsd
wifi wifi github.com/AndroidGoLab/jni/net/wifi
p2p p2p github.com/AndroidGoLab/jni/net/wifi/p2p
rtt rtt github.com/AndroidGoLab/jni/net/wifi/rtt
NFC
nfc nfc github.com/AndroidGoLab/jni/nfc
OS Services
battery battery github.com/AndroidGoLab/jni/os/battery
build build github.com/AndroidGoLab/jni/os/build
environment environment github.com/AndroidGoLab/jni/os/environment
keyguard keyguard github.com/AndroidGoLab/jni/os/keyguard
power power github.com/AndroidGoLab/jni/os/power
storage storage github.com/AndroidGoLab/jni/os/storage
vibrator vibrator github.com/AndroidGoLab/jni/os/vibrator
Providers
documents documents github.com/AndroidGoLab/jni/provider/documents
mediastore media github.com/AndroidGoLab/jni/provider/media
settings settings github.com/AndroidGoLab/jni/provider/settings
Security
keystore keystore github.com/AndroidGoLab/jni/security/keystore
credentials credentials github.com/AndroidGoLab/jni/credentials
omapi omapi github.com/AndroidGoLab/jni/se/omapi
Telecom
telecom telecom github.com/AndroidGoLab/jni/telecom
telephony telephony github.com/AndroidGoLab/jni/telephony
UI
display display github.com/AndroidGoLab/jni/view/display
inputmethod inputmethod github.com/AndroidGoLab/jni/view/inputmethod
toast toast github.com/AndroidGoLab/jni/widget/toast
Other
companion companion github.com/AndroidGoLab/jni/companion
print print github.com/AndroidGoLab/jni/print
speech speech github.com/AndroidGoLab/jni/speech

Architecture

The project converts Android Java API specifications into safe, idiomatic Go packages through four code generation stages:

flowchart TD
    JNISPEC["spec/jni.yaml"]
    JNIOVER["spec/overlays/jni.yaml"]
    JNITMPL["templates/jni/"]
    JAVASPEC["spec/java/*.yaml"]
    JAVAOVER["spec/overlays/java/*.yaml"]
    JAVATMPL["templates/java/"]
    CAPI["capi/*.go"]
    ROOT["*.go (VM, Env, Class, Object, ...)"]
    PKGS["{package}/*.go (53 packages)"]

    JNISPEC --> S1
    JNIOVER --> S1
    JNITMPL --> S1
    subgraph S1["jnigen"]
        direction LR
        S1D["Generates CGo bindings + idiomatic JNI types"]
    end
    S1 --> CAPI
    S1 --> ROOT

    JAVASPEC --> S2
    JAVAOVER --> S2
    JAVATMPL --> S2
    subgraph S2["javagen"]
        direction LR
        S2D["Generates Android API wrapper packages"]
    end
    S2 --> PKGS

    style JNISPEC fill:#fff3cd,color:#000
    style JNIOVER fill:#fff3cd,color:#000
    style JNITMPL fill:#fff3cd,color:#000
    style JAVASPEC fill:#fff3cd,color:#000
    style JAVAOVER fill:#fff3cd,color:#000
    style JAVATMPL fill:#fff3cd,color:#000
    style CAPI fill:#d4edda,color:#000
    style ROOT fill:#cce5ff,color:#000
    style PKGS fill:#cce5ff,color:#000

Legend: Yellow = hand-written inputs, Green = generated intermediates, Blue = final consumer-facing output.

Layers
  1. Raw CGo Layer (capi/) — Direct C bindings to JNI via vtable dispatch. Generated by jnigen.

  2. Idiomatic JNI Layer (root package) — Safe Go types: VM, Env, Class, Object, Value, String, Array, MethodID, FieldID. All JNI exceptions converted to Go errors. Thread safety via VM.Do(). Generated by jnigen.

  3. Android API Layer (53 packages) — High-level wrappers for Android system services. Each package provides a Manager type obtained via NewManager(ctx), with methods that call through JNI. Generated by javagen.

  4. gRPC Layer — See jni-proxy for gRPC remote access (proto/grpc generation lives in that repo).

Project Layout

.
├── *.go                          # Core JNI types (VM, Env, Class, Object, ...)
├── capi/                         # Raw CGo bindings to JNI C API
├── internal/                     # Internal: exception handling, test JVM
│
├── app/                          # Android API wrappers (Java SDK hierarchy)
│   ├── alarm/, download/, ...
├── bluetooth/
├── hardware/
│   ├── camera/, usb/, ...
├── media/
│   ├── audiomanager/, player/, ...
├── net/
│   ├── wifi/, nsd/, ...
├── os/
│   ├── power/, battery/, ...
├── ...                           # (53 packages total)
│
├── tools/                        # Code generators
│   ├── jnigen/                   #   Core JNI + capi generation
│   ├── javagen/                  #   Android API package generation
│   └── specgen/                  #   YAML spec generation from .class files
├── spec/                         # YAML API specifications
│   ├── jni.yaml                  #   JNI C API spec
│   ├── java/                     #   Per-package Android API specs
│   └── overlays/                 #   Hand-written customizations
├── templates/                    # Go text templates for code generation
│   ├── jni/
│   └── java/
│
├── ref/android/                  # Reference .class files
└── examples/                     # Per-package usage examples (53 NativeActivity apps)
    ├── common/ui/                #   Shared NativeActivity lifecycle + Canvas renderer
    ├── alarm/, battery/, ...     #   One directory per package
    └── apk.mk                   #   Shared APK build rules

Make Targets

Target Description Requires
make generate Run all generators (specs + jni + java) JDK + Android SDK
make specs Generate YAML specs from .class files JDK + Android SDK
make jni Generate core JNI + capi --
make java Generate Android API packages --
make test Run all tests JDK
make test-tools Run generator tests only --
make examples Build all 53 example APKs Android SDK + NDK
make build Cross-compile for android/arm64 Android NDK
make prove Verify Lean 4 proofs elan/lake
make lint Run golangci-lint golangci-lint
make clean Remove all generated files --

E2E Test Verification

The JNI bindings and generated Android API packages are verified via jni-proxy E2E tests against real hardware.

Verified platforms (click to expand)
Type Device Android API ABI Build Date Passed Total
Phone Pixel 8a 16 36 arm64-v8a BP4A.260205.001 2026-03-15 21 21
Emulator sdk_gphone64_x86_64 15 35 x86_64 2026-03-14 21 21

Tests cover: JNI version, class operations, method lookup + call, string round-trip, object operations, handle lifecycle, field access, exception handling, and full integration workflows. Camera recording, microphone recording, GPS location, and battery status are also verified on the Pixel 8a.

Adding a New Android API Package

  1. Create spec/java/{package}.yaml with the Java class, methods, and go_import path.
  2. Optionally create spec/overlays/java/{package}.yaml for customizations (extra methods, type overrides, name overrides).
  3. Run make java to generate the Go package.
  4. For gRPC support, see jni-proxy.

Documentation ¶

Overview ¶

Package jni provides idiomatic Go bindings for the Java Native Interface (JNI).

The root package exposes the idiomatic API: Env, VM, Class, Object, String, Array, MethodID, FieldID, Value, and related types. All JNI exceptions are converted to Go errors. Thread safety is handled via VM.Do().

The raw CGo bindings live in the capi/ sub-package. Most users should not need to import capi/ directly.

Code in this package is generated by jnigen from spec/jni.yaml and spec/overlays/jni.yaml. Do not edit generated files; edit the spec and overlay instead, then run `make jni`.

Index ¶

Constants ¶

View Source
const (
	JNI_VERSION_1_1 = capi.JNI_VERSION_1_1
	JNI_VERSION_1_2 = capi.JNI_VERSION_1_2
	JNI_VERSION_1_4 = capi.JNI_VERSION_1_4
	JNI_VERSION_1_6 = capi.JNI_VERSION_1_6
	JNI_VERSION_1_8 = capi.JNI_VERSION_1_8
	JNI_VERSION_9   = capi.JNI_VERSION_9
	JNI_VERSION_10  = capi.JNI_VERSION_10
	JNI_VERSION_19  = capi.JNI_VERSION_19
	JNI_VERSION_20  = capi.JNI_VERSION_20
	JNI_VERSION_21  = capi.JNI_VERSION_21
)

JNI version constants.

View Source
const (
	JNI_FALSE = capi.JNI_FALSE
	JNI_TRUE  = capi.JNI_TRUE
)

JNI boolean constants.

View Source
const (
	JNI_COMMIT = capi.JNI_COMMIT
	JNI_ABORT  = capi.JNI_ABORT
)

JNI array release mode constants.

View Source
const (
	JNIInvalidRefType    = capi.JNIInvalidRefType
	JNILocalRefType      = capi.JNILocalRefType
	JNIGlobalRefType     = capi.JNIGlobalRefType
	JNIWeakGlobalRefType = capi.JNIWeakGlobalRefType
)

JNI object reference type constants.

View Source
const (
	JNI_OK        = Error(0)
	JNI_ERR       = Error(-1)
	JNI_EDETACHED = Error(-2)
	JNI_EVERSION  = Error(-3)
	JNI_ENOMEM    = Error(-4)
	JNI_EEXIST    = Error(-5)
	JNI_EINVAL    = Error(-6)
)

JNI error constants.

Variables ¶

View Source
var ErrDetached = Error(JNI_EDETACHED)

ErrDetached is returned by VM.GetEnv when the current thread is not attached to the JVM.

Functions ¶

func EnsureProxyInit ¶

func EnsureProxyInit(env *Env) error

EnsureProxyInit performs one-time initialization of the proxy infrastructure (native method registration for GoInvocationHandler and GoAbstractDispatch). Safe to call multiple times.

func RegisterProxyHandler ¶

func RegisterProxyHandler(h ProxyHandler) int64

RegisterProxyHandler stores a basic ProxyHandler in the global registry and returns a unique handler ID. This is used by the gRPC server layer when creating abstract class adapter proxies (which dispatch without a Method object). Call UnregisterProxyHandler when the proxy is no longer needed.

func SetProxyClassLoader ¶

func SetProxyClassLoader(cl *Object)

SetProxyClassLoader sets a fallback ClassLoader that proxy init uses to find GoInvocationHandler when JNI FindClass fails. Call this with the APK's ClassLoader (from Context.getClassLoader()) before creating any proxies. The caller must pass a global ref (not a local ref).

func UnregisterProxyHandler ¶

func UnregisterProxyHandler(id int64)

UnregisterProxyHandler removes a handler by ID from the global registry.

Types ¶

type Array ¶

type Array struct {
	Object
}

Array wraps the JNI jarray reference type.

type BooleanArray ¶

type BooleanArray struct {
	Array
}

BooleanArray wraps the JNI jbooleanArray reference type.

type ByteArray ¶

type ByteArray struct {
	Array
}

ByteArray wraps the JNI jbyteArray reference type.

type CAPIObject ¶

type CAPIObject = capi.Object

CAPIObject is an alias for capi.Object (C.jobject), exported so that packages outside capi can reference the type for unsafe conversions between different CGO compilation units.

type CharArray ¶

type CharArray struct {
	Array
}

CharArray wraps the JNI jcharArray reference type.

type Class ¶

type Class struct {
	Object
}

Class wraps the JNI jclass reference type.

type DoubleArray ¶

type DoubleArray struct {
	Array
}

DoubleArray wraps the JNI jdoubleArray reference type.

type Env ¶

type Env struct {
	// contains filtered or unexported fields
}

Env wraps a JNIEnv pointer. It is only valid on the OS thread where it was obtained. Use VM.Do() to get a valid Env.

func EnvFromPtr ¶

func EnvFromPtr(ptr unsafe.Pointer) *Env

EnvFromPtr creates an Env from a raw JNIEnv pointer.

func EnvFromUintptr ¶ added in v0.0.6

func EnvFromUintptr(ptr uintptr) *Env

EnvFromUintptr creates an Env from a uintptr-encoded JNIEnv pointer. This is the convention used by gomobile (RunOnJVM) and other Go Android frameworks.

The uintptr→unsafe.Pointer conversion is safe because JNI pointers are C-allocated and not tracked by the Go garbage collector. unsafe.Add(nil, ptr) is used instead of unsafe.Pointer(ptr) to avoid a go vet "possible misuse of unsafe.Pointer" false positive.

func (*Env) AllocObject ¶

func (e *Env) AllocObject(cls *Class) (*Object, error)

AllocObject wraps the JNI AllocObject function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallBooleanMethod ¶

func (e *Env) CallBooleanMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (uint8, error)

CallBooleanMethod wraps the JNI CallBooleanMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallByteMethod ¶

func (e *Env) CallByteMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (int8, error)

CallByteMethod wraps the JNI CallByteMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallCharMethod ¶

func (e *Env) CallCharMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (uint16, error)

CallCharMethod wraps the JNI CallCharMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallDoubleMethod ¶

func (e *Env) CallDoubleMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (float64, error)

CallDoubleMethod wraps the JNI CallDoubleMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallFloatMethod ¶

func (e *Env) CallFloatMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (float32, error)

CallFloatMethod wraps the JNI CallFloatMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallIntMethod ¶

func (e *Env) CallIntMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (int32, error)

CallIntMethod wraps the JNI CallIntMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallLongMethod ¶

func (e *Env) CallLongMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (int64, error)

CallLongMethod wraps the JNI CallLongMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualBooleanMethod ¶

func (e *Env) CallNonvirtualBooleanMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (uint8, error)

CallNonvirtualBooleanMethod wraps the JNI CallNonvirtualBooleanMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualByteMethod ¶

func (e *Env) CallNonvirtualByteMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (int8, error)

CallNonvirtualByteMethod wraps the JNI CallNonvirtualByteMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualCharMethod ¶

func (e *Env) CallNonvirtualCharMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (uint16, error)

CallNonvirtualCharMethod wraps the JNI CallNonvirtualCharMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualDoubleMethod ¶

func (e *Env) CallNonvirtualDoubleMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (float64, error)

CallNonvirtualDoubleMethod wraps the JNI CallNonvirtualDoubleMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualFloatMethod ¶

func (e *Env) CallNonvirtualFloatMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (float32, error)

CallNonvirtualFloatMethod wraps the JNI CallNonvirtualFloatMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualIntMethod ¶

func (e *Env) CallNonvirtualIntMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (int32, error)

CallNonvirtualIntMethod wraps the JNI CallNonvirtualIntMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualLongMethod ¶

func (e *Env) CallNonvirtualLongMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (int64, error)

CallNonvirtualLongMethod wraps the JNI CallNonvirtualLongMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualObjectMethod ¶

func (e *Env) CallNonvirtualObjectMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (*Object, error)

CallNonvirtualObjectMethod wraps the JNI CallNonvirtualObjectMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualShortMethod ¶

func (e *Env) CallNonvirtualShortMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) (int16, error)

CallNonvirtualShortMethod wraps the JNI CallNonvirtualShortMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallNonvirtualVoidMethod ¶

func (e *Env) CallNonvirtualVoidMethod(
	obj *Object,
	cls *Class,
	method MethodID,
	args ...Value,
) error

CallNonvirtualVoidMethod wraps the JNI CallNonvirtualVoidMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallObjectMethod ¶

func (e *Env) CallObjectMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (*Object, error)

CallObjectMethod wraps the JNI CallObjectMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallShortMethod ¶

func (e *Env) CallShortMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) (int16, error)

CallShortMethod wraps the JNI CallShortMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticBooleanMethod ¶

func (e *Env) CallStaticBooleanMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (uint8, error)

CallStaticBooleanMethod wraps the JNI CallStaticBooleanMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticByteMethod ¶

func (e *Env) CallStaticByteMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (int8, error)

CallStaticByteMethod wraps the JNI CallStaticByteMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticCharMethod ¶

func (e *Env) CallStaticCharMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (uint16, error)

CallStaticCharMethod wraps the JNI CallStaticCharMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticDoubleMethod ¶

func (e *Env) CallStaticDoubleMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (float64, error)

CallStaticDoubleMethod wraps the JNI CallStaticDoubleMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticFloatMethod ¶

func (e *Env) CallStaticFloatMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (float32, error)

CallStaticFloatMethod wraps the JNI CallStaticFloatMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticIntMethod ¶

func (e *Env) CallStaticIntMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (int32, error)

CallStaticIntMethod wraps the JNI CallStaticIntMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticLongMethod ¶

func (e *Env) CallStaticLongMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (int64, error)

CallStaticLongMethod wraps the JNI CallStaticLongMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticObjectMethod ¶

func (e *Env) CallStaticObjectMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (*Object, error)

CallStaticObjectMethod wraps the JNI CallStaticObjectMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticShortMethod ¶

func (e *Env) CallStaticShortMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) (int16, error)

CallStaticShortMethod wraps the JNI CallStaticShortMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallStaticVoidMethod ¶

func (e *Env) CallStaticVoidMethod(
	cls *Class,
	method MethodID,
	args ...Value,
) error

CallStaticVoidMethod wraps the JNI CallStaticVoidMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) CallVoidMethod ¶

func (e *Env) CallVoidMethod(
	obj *Object,
	method MethodID,
	args ...Value,
) error

CallVoidMethod wraps the JNI CallVoidMethodA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) DefineClass ¶

func (e *Env) DefineClass(
	name string,
	loader *Object,
	buf []byte,
) (*Class, error)

DefineClass wraps the JNI DefineClass function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) DeleteGlobalRef ¶

func (e *Env) DeleteGlobalRef(globalRef *Object)

DeleteGlobalRef wraps the JNI DeleteGlobalRef function.

func (*Env) DeleteLocalRef ¶

func (e *Env) DeleteLocalRef(localRef *Object)

DeleteLocalRef wraps the JNI DeleteLocalRef function.

func (*Env) DeleteWeakGlobalRef ¶

func (e *Env) DeleteWeakGlobalRef(ref *WeakRef)

DeleteWeakGlobalRef wraps the JNI DeleteWeakGlobalRef function.

func (*Env) EnsureLocalCapacity ¶

func (e *Env) EnsureLocalCapacity(capacity int32) error

EnsureLocalCapacity wraps the JNI EnsureLocalCapacity function.

func (*Env) ExceptionCheck ¶

func (e *Env) ExceptionCheck() bool

ExceptionCheck wraps the JNI ExceptionCheck function.

func (*Env) ExceptionClear ¶

func (e *Env) ExceptionClear()

ExceptionClear wraps the JNI ExceptionClear function.

func (*Env) ExceptionDescribe ¶

func (e *Env) ExceptionDescribe()

ExceptionDescribe wraps the JNI ExceptionDescribe function.

func (*Env) ExceptionOccurred ¶

func (e *Env) ExceptionOccurred() *Throwable

ExceptionOccurred wraps the JNI ExceptionOccurred function.

func (*Env) FatalError ¶

func (e *Env) FatalError(msg string)

FatalError wraps the JNI FatalError function.

func (*Env) FindClass ¶

func (e *Env) FindClass(name string) (*Class, error)

FindClass wraps the JNI FindClass function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) FromReflectedField ¶

func (e *Env) FromReflectedField(field *Object) FieldID

FromReflectedField wraps the JNI FromReflectedField function.

func (*Env) FromReflectedMethod ¶

func (e *Env) FromReflectedMethod(method *Object) MethodID

FromReflectedMethod wraps the JNI FromReflectedMethod function.

func (*Env) GetArrayLength ¶

func (e *Env) GetArrayLength(array *Array) int32

GetArrayLength wraps the JNI GetArrayLength function.

func (*Env) GetBooleanArrayElements ¶

func (e *Env) GetBooleanArrayElements(array *BooleanArray, isCopy *uint8) unsafe.Pointer

GetBooleanArrayElements wraps the JNI GetBooleanArrayElements function.

func (*Env) GetBooleanArrayRegion ¶

func (e *Env) GetBooleanArrayRegion(
	array *BooleanArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetBooleanArrayRegion wraps the JNI GetBooleanArrayRegion function.

func (*Env) GetBooleanField ¶

func (e *Env) GetBooleanField(obj *Object, field FieldID) uint8

GetBooleanField wraps the JNI GetBooleanField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetByteArrayElements ¶

func (e *Env) GetByteArrayElements(array *ByteArray, isCopy *uint8) unsafe.Pointer

GetByteArrayElements wraps the JNI GetByteArrayElements function.

func (*Env) GetByteArrayRegion ¶

func (e *Env) GetByteArrayRegion(
	array *ByteArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetByteArrayRegion wraps the JNI GetByteArrayRegion function.

func (*Env) GetByteField ¶

func (e *Env) GetByteField(obj *Object, field FieldID) int8

GetByteField wraps the JNI GetByteField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetCharArrayElements ¶

func (e *Env) GetCharArrayElements(array *CharArray, isCopy *uint8) unsafe.Pointer

GetCharArrayElements wraps the JNI GetCharArrayElements function.

func (*Env) GetCharArrayRegion ¶

func (e *Env) GetCharArrayRegion(
	array *CharArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetCharArrayRegion wraps the JNI GetCharArrayRegion function.

func (*Env) GetCharField ¶

func (e *Env) GetCharField(obj *Object, field FieldID) uint16

GetCharField wraps the JNI GetCharField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetDirectBufferAddress ¶

func (e *Env) GetDirectBufferAddress(buf *Object) unsafe.Pointer

GetDirectBufferAddress wraps the JNI GetDirectBufferAddress function.

func (*Env) GetDirectBufferCapacity ¶

func (e *Env) GetDirectBufferCapacity(buf *Object) int64

GetDirectBufferCapacity wraps the JNI GetDirectBufferCapacity function.

func (*Env) GetDoubleArrayElements ¶

func (e *Env) GetDoubleArrayElements(array *DoubleArray, isCopy *uint8) unsafe.Pointer

GetDoubleArrayElements wraps the JNI GetDoubleArrayElements function.

func (*Env) GetDoubleArrayRegion ¶

func (e *Env) GetDoubleArrayRegion(
	array *DoubleArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetDoubleArrayRegion wraps the JNI GetDoubleArrayRegion function.

func (*Env) GetDoubleField ¶

func (e *Env) GetDoubleField(obj *Object, field FieldID) float64

GetDoubleField wraps the JNI GetDoubleField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetFieldID ¶

func (e *Env) GetFieldID(
	cls *Class,
	name string,
	sig string,
) (FieldID, error)

GetFieldID wraps the JNI GetFieldID function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetFloatArrayElements ¶

func (e *Env) GetFloatArrayElements(array *FloatArray, isCopy *uint8) unsafe.Pointer

GetFloatArrayElements wraps the JNI GetFloatArrayElements function.

func (*Env) GetFloatArrayRegion ¶

func (e *Env) GetFloatArrayRegion(
	array *FloatArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetFloatArrayRegion wraps the JNI GetFloatArrayRegion function.

func (*Env) GetFloatField ¶

func (e *Env) GetFloatField(obj *Object, field FieldID) float32

GetFloatField wraps the JNI GetFloatField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetIntArrayElements ¶

func (e *Env) GetIntArrayElements(array *IntArray, isCopy *uint8) unsafe.Pointer

GetIntArrayElements wraps the JNI GetIntArrayElements function.

func (*Env) GetIntArrayRegion ¶

func (e *Env) GetIntArrayRegion(
	array *IntArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetIntArrayRegion wraps the JNI GetIntArrayRegion function.

func (*Env) GetIntField ¶

func (e *Env) GetIntField(obj *Object, field FieldID) int32

GetIntField wraps the JNI GetIntField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetLongArrayElements ¶

func (e *Env) GetLongArrayElements(array *LongArray, isCopy *uint8) unsafe.Pointer

GetLongArrayElements wraps the JNI GetLongArrayElements function.

func (*Env) GetLongArrayRegion ¶

func (e *Env) GetLongArrayRegion(
	array *LongArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetLongArrayRegion wraps the JNI GetLongArrayRegion function.

func (*Env) GetLongField ¶

func (e *Env) GetLongField(obj *Object, field FieldID) int64

GetLongField wraps the JNI GetLongField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetMethodID ¶

func (e *Env) GetMethodID(
	cls *Class,
	name string,
	sig string,
) (MethodID, error)

GetMethodID wraps the JNI GetMethodID function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetObjectArrayElement ¶

func (e *Env) GetObjectArrayElement(array *ObjectArray, index int32) (*Object, error)

GetObjectArrayElement wraps the JNI GetObjectArrayElement function.

func (*Env) GetObjectClass ¶

func (e *Env) GetObjectClass(obj *Object) *Class

GetObjectClass wraps the JNI GetObjectClass function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetObjectField ¶

func (e *Env) GetObjectField(obj *Object, field FieldID) *Object

GetObjectField wraps the JNI GetObjectField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetObjectRefType ¶

func (e *Env) GetObjectRefType(obj *Object) ObjectRefType

GetObjectRefType wraps the JNI GetObjectRefType function.

func (*Env) GetPrimitiveArrayCritical ¶

func (e *Env) GetPrimitiveArrayCritical(array *Array, isCopy *uint8) unsafe.Pointer

GetPrimitiveArrayCritical wraps the JNI GetPrimitiveArrayCritical function.

func (*Env) GetShortArrayElements ¶

func (e *Env) GetShortArrayElements(array *ShortArray, isCopy *uint8) unsafe.Pointer

GetShortArrayElements wraps the JNI GetShortArrayElements function.

func (*Env) GetShortArrayRegion ¶

func (e *Env) GetShortArrayRegion(
	array *ShortArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

GetShortArrayRegion wraps the JNI GetShortArrayRegion function.

func (*Env) GetShortField ¶

func (e *Env) GetShortField(obj *Object, field FieldID) int16

GetShortField wraps the JNI GetShortField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticBooleanField ¶

func (e *Env) GetStaticBooleanField(cls *Class, field FieldID) uint8

GetStaticBooleanField wraps the JNI GetStaticBooleanField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticByteField ¶

func (e *Env) GetStaticByteField(cls *Class, field FieldID) int8

GetStaticByteField wraps the JNI GetStaticByteField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticCharField ¶

func (e *Env) GetStaticCharField(cls *Class, field FieldID) uint16

GetStaticCharField wraps the JNI GetStaticCharField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticDoubleField ¶

func (e *Env) GetStaticDoubleField(cls *Class, field FieldID) float64

GetStaticDoubleField wraps the JNI GetStaticDoubleField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticFieldID ¶

func (e *Env) GetStaticFieldID(
	cls *Class,
	name string,
	sig string,
) (FieldID, error)

GetStaticFieldID wraps the JNI GetStaticFieldID function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticFloatField ¶

func (e *Env) GetStaticFloatField(cls *Class, field FieldID) float32

GetStaticFloatField wraps the JNI GetStaticFloatField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticIntField ¶

func (e *Env) GetStaticIntField(cls *Class, field FieldID) int32

GetStaticIntField wraps the JNI GetStaticIntField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticLongField ¶

func (e *Env) GetStaticLongField(cls *Class, field FieldID) int64

GetStaticLongField wraps the JNI GetStaticLongField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticMethodID ¶

func (e *Env) GetStaticMethodID(
	cls *Class,
	name string,
	sig string,
) (MethodID, error)

GetStaticMethodID wraps the JNI GetStaticMethodID function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticObjectField ¶

func (e *Env) GetStaticObjectField(cls *Class, field FieldID) *Object

GetStaticObjectField wraps the JNI GetStaticObjectField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStaticShortField ¶

func (e *Env) GetStaticShortField(cls *Class, field FieldID) int16

GetStaticShortField wraps the JNI GetStaticShortField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) GetStringChars ¶

func (e *Env) GetStringChars(str *String, isCopy *uint8) (unsafe.Pointer, error)

GetStringChars wraps the JNI GetStringChars function.

func (*Env) GetStringCritical ¶

func (e *Env) GetStringCritical(str *String, isCopy *uint8) unsafe.Pointer

GetStringCritical wraps the JNI GetStringCritical function.

func (*Env) GetStringLength ¶

func (e *Env) GetStringLength(str *String) int32

GetStringLength wraps the JNI GetStringLength function.

func (*Env) GetStringRegion ¶

func (e *Env) GetStringRegion(
	str *String,
	start int32,
	len int32,
	buf []uint16,
) error

GetStringRegion wraps the JNI GetStringRegion function.

func (*Env) GetStringUTFChars ¶

func (e *Env) GetStringUTFChars(str *String, isCopy *uint8) (unsafe.Pointer, error)

GetStringUTFChars wraps the JNI GetStringUTFChars function.

func (*Env) GetStringUTFLength ¶

func (e *Env) GetStringUTFLength(str *String) int32

GetStringUTFLength wraps the JNI GetStringUTFLength function.

func (*Env) GetStringUTFRegion ¶

func (e *Env) GetStringUTFRegion(
	str *String,
	start int32,
	len int32,
	buf []byte,
) error

GetStringUTFRegion wraps the JNI GetStringUTFRegion function.

func (*Env) GetSuperclass ¶

func (e *Env) GetSuperclass(cls *Class) *Class

GetSuperclass wraps the JNI GetSuperclass function.

func (*Env) GetVersion ¶

func (e *Env) GetVersion() int32

GetVersion wraps the JNI GetVersion function.

func (*Env) GoString ¶

func (e *Env) GoString(str *String) string

GoString converts a JNI String to a Go string using modified UTF-8 encoding. If str is nil, it returns an empty string.

func (*Env) IsAssignableFrom ¶

func (e *Env) IsAssignableFrom(cls1 *Class, cls2 *Class) bool

IsAssignableFrom wraps the JNI IsAssignableFrom function.

func (*Env) IsInstanceOf ¶

func (e *Env) IsInstanceOf(obj *Object, cls *Class) bool

IsInstanceOf wraps the JNI IsInstanceOf function.

func (*Env) IsSameObject ¶

func (e *Env) IsSameObject(ref1 *Object, ref2 *Object) bool

IsSameObject wraps the JNI IsSameObject function.

func (*Env) MonitorEnter ¶

func (e *Env) MonitorEnter(obj *Object) error

MonitorEnter wraps the JNI MonitorEnter function.

func (*Env) MonitorExit ¶

func (e *Env) MonitorExit(obj *Object) error

MonitorExit wraps the JNI MonitorExit function.

func (*Env) NewBooleanArray ¶

func (e *Env) NewBooleanArray(length int32) *BooleanArray

NewBooleanArray wraps the JNI NewBooleanArray function.

func (*Env) NewByteArray ¶

func (e *Env) NewByteArray(length int32) *ByteArray

NewByteArray wraps the JNI NewByteArray function.

func (*Env) NewCharArray ¶

func (e *Env) NewCharArray(length int32) *CharArray

NewCharArray wraps the JNI NewCharArray function.

func (*Env) NewDirectByteBuffer ¶

func (e *Env) NewDirectByteBuffer(address unsafe.Pointer, capacity int64) *Object

NewDirectByteBuffer wraps the JNI NewDirectByteBuffer function.

func (*Env) NewDoubleArray ¶

func (e *Env) NewDoubleArray(length int32) *DoubleArray

NewDoubleArray wraps the JNI NewDoubleArray function.

func (*Env) NewFloatArray ¶

func (e *Env) NewFloatArray(length int32) *FloatArray

NewFloatArray wraps the JNI NewFloatArray function.

func (*Env) NewGlobalRef ¶

func (e *Env) NewGlobalRef(obj *Object) *Object

NewGlobalRef wraps the JNI NewGlobalRef function.

func (*Env) NewIntArray ¶

func (e *Env) NewIntArray(length int32) *IntArray

NewIntArray wraps the JNI NewIntArray function.

func (*Env) NewLocalRef ¶

func (e *Env) NewLocalRef(obj *Object) *Object

NewLocalRef wraps the JNI NewLocalRef function.

func (*Env) NewLongArray ¶

func (e *Env) NewLongArray(length int32) *LongArray

NewLongArray wraps the JNI NewLongArray function.

func (*Env) NewObject ¶

func (e *Env) NewObject(
	cls *Class,
	method MethodID,
	args ...Value,
) (*Object, error)

NewObject wraps the JNI NewObjectA function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) NewObjectArray ¶

func (e *Env) NewObjectArray(
	length int32,
	elementClass *Class,
	initialElement *Object,
) (*ObjectArray, error)

NewObjectArray wraps the JNI NewObjectArray function.

func (*Env) NewProxy ¶

func (e *Env) NewProxy(
	ifaces []*Class,
	handler func(env *Env, methodName string, args []*Object) (*Object, error),
) (proxy *Object, cleanup func(), err error)

NewProxy creates a java.lang.reflect.Proxy that implements the given Java interfaces, dispatching all method calls to the Go handler.

The handler receives the method name and an array of arguments (as *Object, with boxed primitives). It returns a result *Object (or nil for void) and an optional error (which becomes a RuntimeException on the Java side).

The returned cleanup function MUST be called when the proxy is no longer needed, to remove the handler from the global registry. Failing to call cleanup leaks memory.

Example:

proxy, cleanup, err := env.NewProxy(
    []*Class{listenerClass},
    func(env *Env, method string, args []*Object) (*Object, error) {
        switch method {
        case "onLocationChanged":
            // handle location update
        }
        return nil, nil
    },
)
defer cleanup()

func (*Env) NewProxyFull ¶

func (e *Env) NewProxyFull(
	ifaces []*Class,
	handler ProxyHandlerFull,
) (proxy *Object, cleanup func(), err error)

NewProxyFull creates a java.lang.reflect.Proxy like NewProxy, but dispatches to a ProxyHandlerFull that also receives the java.lang.reflect.Method object. This allows the handler to inspect the method's return type (e.g. to detect void callbacks).

See NewProxy for full documentation on usage and cleanup semantics.

func (*Env) NewShortArray ¶

func (e *Env) NewShortArray(length int32) *ShortArray

NewShortArray wraps the JNI NewShortArray function.

func (*Env) NewString ¶

func (e *Env) NewString(unicodeChars []uint16) (*String, error)

NewString wraps the JNI NewString function.

func (*Env) NewStringUTF ¶

func (e *Env) NewStringUTF(bytes string) (*String, error)

NewStringUTF wraps the JNI NewStringUTF function.

func (*Env) NewWeakGlobalRef ¶

func (e *Env) NewWeakGlobalRef(obj *Object) *WeakRef

NewWeakGlobalRef wraps the JNI NewWeakGlobalRef function.

func (*Env) PopLocalFrame ¶

func (e *Env) PopLocalFrame(result *Object) *Object

PopLocalFrame wraps the JNI PopLocalFrame function.

func (*Env) Ptr ¶

func (e *Env) Ptr() unsafe.Pointer

Ptr returns the raw JNIEnv pointer for interop with other CGo code.

func (*Env) PushLocalFrame ¶

func (e *Env) PushLocalFrame(capacity int32) error

PushLocalFrame wraps the JNI PushLocalFrame function.

func (*Env) RegisterNatives ¶

func (e *Env) RegisterNatives(
	cls *Class,
	methods unsafe.Pointer,
	nMethods int32,
) error

RegisterNatives wraps the JNI RegisterNatives function.

func (*Env) ReleaseBooleanArrayElements ¶

func (e *Env) ReleaseBooleanArrayElements(
	array *BooleanArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseBooleanArrayElements wraps the JNI ReleaseBooleanArrayElements function.

func (*Env) ReleaseByteArrayElements ¶

func (e *Env) ReleaseByteArrayElements(
	array *ByteArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseByteArrayElements wraps the JNI ReleaseByteArrayElements function.

func (*Env) ReleaseCharArrayElements ¶

func (e *Env) ReleaseCharArrayElements(
	array *CharArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseCharArrayElements wraps the JNI ReleaseCharArrayElements function.

func (*Env) ReleaseDoubleArrayElements ¶

func (e *Env) ReleaseDoubleArrayElements(
	array *DoubleArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseDoubleArrayElements wraps the JNI ReleaseDoubleArrayElements function.

func (*Env) ReleaseFloatArrayElements ¶

func (e *Env) ReleaseFloatArrayElements(
	array *FloatArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseFloatArrayElements wraps the JNI ReleaseFloatArrayElements function.

func (*Env) ReleaseIntArrayElements ¶

func (e *Env) ReleaseIntArrayElements(
	array *IntArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseIntArrayElements wraps the JNI ReleaseIntArrayElements function.

func (*Env) ReleaseLongArrayElements ¶

func (e *Env) ReleaseLongArrayElements(
	array *LongArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseLongArrayElements wraps the JNI ReleaseLongArrayElements function.

func (*Env) ReleasePrimitiveArrayCritical ¶

func (e *Env) ReleasePrimitiveArrayCritical(
	array *Array,
	carray unsafe.Pointer,
	mode int32,
)

ReleasePrimitiveArrayCritical wraps the JNI ReleasePrimitiveArrayCritical function.

func (*Env) ReleaseShortArrayElements ¶

func (e *Env) ReleaseShortArrayElements(
	array *ShortArray,
	elems unsafe.Pointer,
	mode int32,
)

ReleaseShortArrayElements wraps the JNI ReleaseShortArrayElements function.

func (*Env) ReleaseStringChars ¶

func (e *Env) ReleaseStringChars(str *String, chars unsafe.Pointer)

ReleaseStringChars wraps the JNI ReleaseStringChars function.

func (*Env) ReleaseStringCritical ¶

func (e *Env) ReleaseStringCritical(str *String, cstr unsafe.Pointer)

ReleaseStringCritical wraps the JNI ReleaseStringCritical function.

func (*Env) ReleaseStringUTFChars ¶

func (e *Env) ReleaseStringUTFChars(str *String, utf unsafe.Pointer)

ReleaseStringUTFChars wraps the JNI ReleaseStringUTFChars function.

func (*Env) SetBooleanArrayRegion ¶

func (e *Env) SetBooleanArrayRegion(
	array *BooleanArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetBooleanArrayRegion wraps the JNI SetBooleanArrayRegion function.

func (*Env) SetBooleanField ¶

func (e *Env) SetBooleanField(
	obj *Object,
	field FieldID,
	value uint8,
)

SetBooleanField wraps the JNI SetBooleanField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetByteArrayRegion ¶

func (e *Env) SetByteArrayRegion(
	array *ByteArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetByteArrayRegion wraps the JNI SetByteArrayRegion function.

func (*Env) SetByteField ¶

func (e *Env) SetByteField(
	obj *Object,
	field FieldID,
	value int8,
)

SetByteField wraps the JNI SetByteField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetCharArrayRegion ¶

func (e *Env) SetCharArrayRegion(
	array *CharArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetCharArrayRegion wraps the JNI SetCharArrayRegion function.

func (*Env) SetCharField ¶

func (e *Env) SetCharField(
	obj *Object,
	field FieldID,
	value uint16,
)

SetCharField wraps the JNI SetCharField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetDoubleArrayRegion ¶

func (e *Env) SetDoubleArrayRegion(
	array *DoubleArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetDoubleArrayRegion wraps the JNI SetDoubleArrayRegion function.

func (*Env) SetDoubleField ¶

func (e *Env) SetDoubleField(
	obj *Object,
	field FieldID,
	value float64,
)

SetDoubleField wraps the JNI SetDoubleField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetFloatArrayRegion ¶

func (e *Env) SetFloatArrayRegion(
	array *FloatArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetFloatArrayRegion wraps the JNI SetFloatArrayRegion function.

func (*Env) SetFloatField ¶

func (e *Env) SetFloatField(
	obj *Object,
	field FieldID,
	value float32,
)

SetFloatField wraps the JNI SetFloatField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetIntArrayRegion ¶

func (e *Env) SetIntArrayRegion(
	array *IntArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetIntArrayRegion wraps the JNI SetIntArrayRegion function.

func (*Env) SetIntField ¶

func (e *Env) SetIntField(
	obj *Object,
	field FieldID,
	value int32,
)

SetIntField wraps the JNI SetIntField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetLongArrayRegion ¶

func (e *Env) SetLongArrayRegion(
	array *LongArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetLongArrayRegion wraps the JNI SetLongArrayRegion function.

func (*Env) SetLongField ¶

func (e *Env) SetLongField(
	obj *Object,
	field FieldID,
	value int64,
)

SetLongField wraps the JNI SetLongField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetObjectArrayElement ¶

func (e *Env) SetObjectArrayElement(
	array *ObjectArray,
	index int32,
	value *Object,
) error

SetObjectArrayElement wraps the JNI SetObjectArrayElement function.

func (*Env) SetObjectField ¶

func (e *Env) SetObjectField(
	obj *Object,
	field FieldID,
	value *Object,
)

SetObjectField wraps the JNI SetObjectField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetShortArrayRegion ¶

func (e *Env) SetShortArrayRegion(
	array *ShortArray,
	start int32,
	len int32,
	buf unsafe.Pointer,
)

SetShortArrayRegion wraps the JNI SetShortArrayRegion function.

func (*Env) SetShortField ¶

func (e *Env) SetShortField(
	obj *Object,
	field FieldID,
	value int16,
)

SetShortField wraps the JNI SetShortField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticBooleanField ¶

func (e *Env) SetStaticBooleanField(
	cls *Class,
	field FieldID,
	value uint8,
)

SetStaticBooleanField wraps the JNI SetStaticBooleanField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticByteField ¶

func (e *Env) SetStaticByteField(
	cls *Class,
	field FieldID,
	value int8,
)

SetStaticByteField wraps the JNI SetStaticByteField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticCharField ¶

func (e *Env) SetStaticCharField(
	cls *Class,
	field FieldID,
	value uint16,
)

SetStaticCharField wraps the JNI SetStaticCharField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticDoubleField ¶

func (e *Env) SetStaticDoubleField(
	cls *Class,
	field FieldID,
	value float64,
)

SetStaticDoubleField wraps the JNI SetStaticDoubleField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticFloatField ¶

func (e *Env) SetStaticFloatField(
	cls *Class,
	field FieldID,
	value float32,
)

SetStaticFloatField wraps the JNI SetStaticFloatField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticIntField ¶

func (e *Env) SetStaticIntField(
	cls *Class,
	field FieldID,
	value int32,
)

SetStaticIntField wraps the JNI SetStaticIntField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticLongField ¶

func (e *Env) SetStaticLongField(
	cls *Class,
	field FieldID,
	value int64,
)

SetStaticLongField wraps the JNI SetStaticLongField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticObjectField ¶

func (e *Env) SetStaticObjectField(
	cls *Class,
	field FieldID,
	value *Object,
)

SetStaticObjectField wraps the JNI SetStaticObjectField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) SetStaticShortField ¶

func (e *Env) SetStaticShortField(
	cls *Class,
	field FieldID,
	value int16,
)

SetStaticShortField wraps the JNI SetStaticShortField function.

This is a low-level call. Prefer the typed wrappers (e.g. packages under app/, content/, provider/) which handle JNI signatures, local/global reference management, and error checking automatically. Use Env methods directly only as a last resort for functionality not yet covered by a typed wrapper.

func (*Env) Throw ¶

func (e *Env) Throw(throwable *Throwable) error

Throw wraps the JNI Throw function.

func (*Env) ThrowNew ¶

func (e *Env) ThrowNew(cls *Class, message string) error

ThrowNew wraps the JNI ThrowNew function.

func (*Env) ToReflectedField ¶

func (e *Env) ToReflectedField(
	cls *Class,
	field FieldID,
	isStatic bool,
) *Object

ToReflectedField wraps the JNI ToReflectedField function.

func (*Env) ToReflectedMethod ¶

func (e *Env) ToReflectedMethod(
	cls *Class,
	method MethodID,
	isStatic bool,
) *Object

ToReflectedMethod wraps the JNI ToReflectedMethod function.

func (*Env) UnregisterNatives ¶

func (e *Env) UnregisterNatives(cls *Class) error

UnregisterNatives wraps the JNI UnregisterNatives function.

type Error ¶

type Error int32

Error represents a JNI return code error (JNI_ERR, JNI_EDETACHED, etc.).

func (Error) Error ¶

func (e Error) Error() string

type FieldID ¶

type FieldID = capi.JfieldID

FieldID is a JNI field identifier.

type FloatArray ¶

type FloatArray struct {
	Array
}

FloatArray wraps the JNI jfloatArray reference type.

type GlobalRef ¶

type GlobalRef = Object

GlobalRef is an Object that has been promoted to a JNI global reference. It has the same layout as Object so that it can be cast to *Class or other reference types via unsafe.Pointer when needed.

type IntArray ¶

type IntArray struct {
	Array
}

IntArray wraps the JNI jintArray reference type.

type LongArray ¶

type LongArray struct {
	Array
}

LongArray wraps the JNI jlongArray reference type.

type MethodID ¶

type MethodID = capi.JmethodID

MethodID is a JNI method identifier.

type Object ¶

type Object struct {
	// contains filtered or unexported fields
}

Object wraps the JNI jobject reference type.

func ObjectFromPtr ¶ added in v0.0.5

func ObjectFromPtr(ptr unsafe.Pointer) *Object

ObjectFromPtr wraps a raw C jobject pointer in an Object, mirroring VMFromPtr. Prefer ObjectFromUintptr for NativeActivity callbacks to avoid go vet "possible misuse of unsafe.Pointer" warnings:

jni.ObjectFromUintptr(uintptr(activity.clazz))

func ObjectFromRef ¶

func ObjectFromRef(ref capi.Object) *Object

ObjectFromRef wraps a raw JNI jobject reference in an Object. The caller is responsible for ensuring the reference is valid.

func ObjectFromUintptr ¶ added in v0.0.6

func ObjectFromUintptr(ptr uintptr) *Object

ObjectFromUintptr wraps a uintptr-encoded jobject in an Object. This is the convention used by gomobile (RunOnJVM passes context as uintptr) and other Go Android frameworks.

unsafe.Add(nil, ptr) is used instead of unsafe.Pointer(ptr) to avoid a go vet "possible misuse of unsafe.Pointer" false positive.

func (*Object) Ref ¶

func (o *Object) Ref() capi.Object

Ref returns the underlying capi reference.

type ObjectArray ¶

type ObjectArray struct {
	Array
}

ObjectArray wraps the JNI jobjectArray reference type.

type ObjectRefType ¶

type ObjectRefType = capi.Jint

ObjectRefType represents the type of a JNI object reference.

type ProxyHandler ¶

type ProxyHandler func(env *Env, methodName string, args []*Object) (*Object, error)

ProxyHandler is a Go function that handles method invocations on a Java interface proxy. It receives the method name and arguments, and returns a result object (or nil for void methods) and an optional error.

type ProxyHandlerFull ¶

type ProxyHandlerFull func(env *Env, method *Object, methodName string, args []*Object) (*Object, error)

ProxyHandlerFull is like ProxyHandler but also receives the java.lang.reflect.Method object for return type inspection (e.g. detecting void callbacks via method.getReturnType()).

type ShortArray ¶

type ShortArray struct {
	Array
}

ShortArray wraps the JNI jshortArray reference type.

type String ¶

type String struct {
	Object
}

String wraps the JNI jstring reference type.

type Throwable ¶

type Throwable struct {
	Object
}

Throwable wraps the JNI jthrowable reference type.

type VM ¶

type VM struct {
	// contains filtered or unexported fields
}

VM wraps a JNI JavaVM pointer. It is process-global and thread-safe.

func VMFromPtr ¶

func VMFromPtr(ptr unsafe.Pointer) *VM

VMFromPtr creates a VM from a raw JavaVM pointer.

func VMFromUintptr ¶ added in v0.0.6

func VMFromUintptr(ptr uintptr) *VM

VMFromUintptr creates a VM from a uintptr-encoded JavaVM pointer. This is the convention used by gomobile (RunOnJVM), Gio (app.JavaVM), and other Go Android frameworks.

The uintptr→unsafe.Pointer conversion is safe because JNI pointers are C-allocated and not tracked by the Go garbage collector. unsafe.Add(nil, ptr) is used instead of unsafe.Pointer(ptr) to avoid a go vet "possible misuse of unsafe.Pointer" false positive.

func (*VM) AttachCurrentThread ¶

func (vm *VM) AttachCurrentThread() (*Env, error)

AttachCurrentThread attaches the current OS thread to the JVM and returns a valid JNIEnv pointer.

func (*VM) Do ¶

func (vm *VM) Do(fn func(env *Env) error) error

Do pins the calling goroutine to an OS thread, attaches it to the JVM (if not already attached), executes fn with a valid *Env, and detaches if it was the one that attached.

This is the primary entry point for all JNI operations. It ensures:

  1. The goroutine stays on the same OS thread for the duration of fn.
  2. The OS thread has a valid JNIEnv (attaching if necessary).
  3. The thread is detached after fn returns (only if Do attached it).

It is safe to nest Do calls. An inner Do finds the thread already attached via GetEnv and neither re-attaches nor detaches. Go reference-counts LockOSThread/UnlockOSThread, so nesting is safe.

func (*VM) GetEnv ¶

func (vm *VM) GetEnv(version capi.Jint) (*Env, error)

GetEnv returns the JNIEnv for the current thread if it is already attached to the JVM. Returns ErrDetached if the thread is not attached.

func (*VM) Ptr ¶

func (vm *VM) Ptr() unsafe.Pointer

Ptr returns the raw JavaVM pointer for interop with other CGo code.

type Value ¶

type Value struct {
	// contains filtered or unexported fields
}

Value wraps a JNI jvalue union. Use the typed constructors (IntValue, LongValue, ObjectValue, etc.) to create values for method call arguments.

func BooleanValue ¶

func BooleanValue(v uint8) Value

BooleanValue creates a Value holding a uint8.

func ByteValue ¶

func ByteValue(v int8) Value

ByteValue creates a Value holding a int8.

func CharValue ¶

func CharValue(v uint16) Value

CharValue creates a Value holding a uint16.

func DoubleValue ¶

func DoubleValue(v float64) Value

DoubleValue creates a Value holding a float64.

func FloatValue ¶

func FloatValue(v float32) Value

FloatValue creates a Value holding a float32.

func IntValue ¶

func IntValue(v int32) Value

IntValue creates a Value holding a int32.

func LongValue ¶

func LongValue(v int64) Value

LongValue creates a Value holding a int64.

func ObjectValue ¶

func ObjectValue(v *Object) Value

ObjectValue creates a Value holding an Object reference.

func ShortValue ¶

func ShortValue(v int16) Value

ShortValue creates a Value holding a int16.

func (Value) Raw ¶

func (v Value) Raw() capi.Jvalue

Raw returns the underlying capi.Jvalue for interop.

type WeakRef ¶

type WeakRef struct {
	Object
}

WeakRef wraps the JNI jweak reference type.

Directories ¶

Path Synopsis
Package accessibilityservice provides Go bindings for android.accessibilityservice.
Package accessibilityservice provides Go bindings for android.accessibilityservice.
Package accounts provides Go bindings for android.accounts.
Package accounts provides Go bindings for android.accounts.
Package adservices provides Go bindings for android.adservices.
Package adservices provides Go bindings for android.adservices.
adid
Package adid provides Go bindings for android.adservices.adid.
Package adid provides Go bindings for android.adservices.adid.
adselection
Package adselection provides Go bindings for android.adservices.adselection.
Package adselection provides Go bindings for android.adservices.adselection.
appsetid
Package appsetid provides Go bindings for android.adservices.appsetid.
Package appsetid provides Go bindings for android.adservices.appsetid.
common
Package common provides Go bindings for android.adservices.common.
Package common provides Go bindings for android.adservices.common.
customaudience
Package customaudience provides Go bindings for android.adservices.customaudience.
Package customaudience provides Go bindings for android.adservices.customaudience.
exceptions
Package exceptions provides Go bindings for android.adservices.exceptions.
Package exceptions provides Go bindings for android.adservices.exceptions.
measurement
Package measurement provides Go bindings for android.adservices.measurement.
Package measurement provides Go bindings for android.adservices.measurement.
ondevicepersonalization
Package ondevicepersonalization provides Go bindings for android.adservices.ondevicepersonalization.
Package ondevicepersonalization provides Go bindings for android.adservices.ondevicepersonalization.
signals
Package signals provides Go bindings for android.adservices.signals.
Package signals provides Go bindings for android.adservices.signals.
topics
Package topics provides Go bindings for android.adservices.topics.
Package topics provides Go bindings for android.adservices.topics.
Package animation provides Go bindings for android.animation.
Package animation provides Go bindings for android.animation.
Package annotation provides Go bindings for android.annotation.
Package annotation provides Go bindings for android.annotation.
app
Package app provides Go bindings for android.app.
Package app provides Go bindings for android.app.
admin
Package admin provides Go bindings for android.app.admin.
Package admin provides Go bindings for android.app.admin.
alarm
Package alarm provides Go bindings for android.app.
Package alarm provides Go bindings for android.app.
appfunctions
Package appfunctions provides Go bindings for android.app.appfunctions.
Package appfunctions provides Go bindings for android.app.appfunctions.
appsearch
Package appsearch provides Go bindings for android.app.appsearch.
Package appsearch provides Go bindings for android.app.appsearch.
appsearch/exceptions
Package exceptions provides Go bindings for android.app.appsearch.exceptions.
Package exceptions provides Go bindings for android.app.appsearch.exceptions.
appsearch/observer
Package observer provides Go bindings for android.app.appsearch.observer.
Package observer provides Go bindings for android.app.appsearch.observer.
appsearch/util
Package util provides Go bindings for android.app.appsearch.util.
Package util provides Go bindings for android.app.appsearch.util.
assist
Package assist provides Go bindings for android.app.assist.
Package assist provides Go bindings for android.app.assist.
backup
Package backup provides Go bindings for android.app.backup.
Package backup provides Go bindings for android.app.backup.
blob
Package blob provides Go bindings for android.app.blob.
Package blob provides Go bindings for android.app.blob.
download
Package download provides Go bindings for android.app.
Package download provides Go bindings for android.app.
jank
Package jank provides Go bindings for android.app.jank.
Package jank provides Go bindings for android.app.jank.
job
Package job provides Go bindings for android.app.job.
Package job provides Go bindings for android.app.job.
notification
Package notification provides Go bindings for android.app.
Package notification provides Go bindings for android.app.
people
Package people provides Go bindings for android.app.people.
Package people provides Go bindings for android.app.people.
role
Package role provides Go bindings for android.app.role.
Package role provides Go bindings for android.app.role.
sdksandbox
Package sdksandbox provides Go bindings for android.app.sdksandbox.
Package sdksandbox provides Go bindings for android.app.sdksandbox.
sdksandbox/sdkprovider
Package sdkprovider provides Go bindings for android.app.sdksandbox.sdkprovider.
Package sdkprovider provides Go bindings for android.app.sdksandbox.sdkprovider.
slice
Package slice provides Go bindings for android.app.slice.
Package slice provides Go bindings for android.app.slice.
usage
Package usage provides Go bindings for android.app.usage.
Package usage provides Go bindings for android.app.usage.
wallpaper
Package wallpaper provides Go bindings for android.app.wallpaper.
Package wallpaper provides Go bindings for android.app.wallpaper.
Package appwidget provides Go bindings for android.appwidget.
Package appwidget provides Go bindings for android.appwidget.
Package bluetooth provides Go bindings for android.bluetooth.
Package bluetooth provides Go bindings for android.bluetooth.
le
Package le provides Go bindings for android.bluetooth.le.
Package le provides Go bindings for android.bluetooth.le.
Desktop builds require CGO_CFLAGS and CGO_LDFLAGS pointing to a JDK:
Desktop builds require CGO_CFLAGS and CGO_LDFLAGS pointing to a JDK:
Package companion provides Go bindings for android.companion.
Package companion provides Go bindings for android.companion.
virtual
Package virtual provides Go bindings for android.companion.virtual.
Package virtual provides Go bindings for android.companion.virtual.
Package content provides Go bindings for android.content.
Package content provides Go bindings for android.content.
clipboard
Package clipboard provides Go bindings for android.content.
Package clipboard provides Go bindings for android.content.
om
Package om provides Go bindings for android.content.om.
Package om provides Go bindings for android.content.om.
permission
Package permission provides Go bindings for android.
Package permission provides Go bindings for android.
pm
Package pm provides Go bindings for android.content.pm.
Package pm provides Go bindings for android.content.pm.
pm/verify/domain
Package domain provides Go bindings for android.content.pm.verify.domain.
Package domain provides Go bindings for android.content.pm.verify.domain.
preferences
Package preferences provides Go bindings for android.content.
Package preferences provides Go bindings for android.content.
res
Package res provides Go bindings for android.content.res.
Package res provides Go bindings for android.content.res.
res/loader
Package loader provides Go bindings for android.content.res.loader.
Package loader provides Go bindings for android.content.res.loader.
resolver
Package resolver provides Go bindings for android.database.
Package resolver provides Go bindings for android.database.
Package credentials provides Go bindings for android.credentials.
Package credentials provides Go bindings for android.credentials.
crypto
hpke
Package hpke provides Go bindings for android.crypto.hpke.
Package hpke provides Go bindings for android.crypto.hpke.
Package database provides Go bindings for android.database.
Package database provides Go bindings for android.database.
sqlite
Package sqlite provides Go bindings for android.database.sqlite.
Package sqlite provides Go bindings for android.database.sqlite.
Package devicelock provides Go bindings for android.devicelock.
Package devicelock provides Go bindings for android.devicelock.
drm
Package drm provides Go bindings for android.drm.
Package drm provides Go bindings for android.drm.
examples
gio command
Command gio demonstrates using this library's typed JNI wrappers from within a Gio UI application.
Command gio demonstrates using this library's typed JNI wrappers from within a Gio UI application.
Package gesture provides Go bindings for android.gesture.
Package gesture provides Go bindings for android.gesture.
Package graphics provides Go bindings for android.graphics.
Package graphics provides Go bindings for android.graphics.
drawable
Package drawable provides Go bindings for android.graphics.drawable.
Package drawable provides Go bindings for android.graphics.drawable.
drawable/shapes
Package shapes provides Go bindings for android.graphics.drawable.shapes.
Package shapes provides Go bindings for android.graphics.drawable.shapes.
fonts
Package fonts provides Go bindings for android.graphics.fonts.
Package fonts provides Go bindings for android.graphics.fonts.
pdf
Package pdf provides Go bindings for android.graphics.
Package pdf provides Go bindings for android.graphics.
pdf/content
Package content provides Go bindings for android.graphics.pdf.content.
Package content provides Go bindings for android.graphics.pdf.content.
pdf/models
Package models provides Go bindings for android.graphics.pdf.models.
Package models provides Go bindings for android.graphics.pdf.models.
pdf/models/selection
Package selection provides Go bindings for android.graphics.pdf.models.selection.
Package selection provides Go bindings for android.graphics.pdf.models.selection.
text
Package text provides Go bindings for android.graphics.text.
Package text provides Go bindings for android.graphics.text.
Package hardware provides Go bindings for android.hardware.
Package hardware provides Go bindings for android.hardware.
biometric
Package biometric provides Go bindings for android.hardware.biometrics.
Package biometric provides Go bindings for android.hardware.biometrics.
biometrics
Package biometrics provides Go bindings for android.hardware.biometrics.
Package biometrics provides Go bindings for android.hardware.biometrics.
camera
Package camera provides Go bindings for android.hardware.camera2.
Package camera provides Go bindings for android.hardware.camera2.
camera2
Package camera2 provides Go bindings for android.hardware.camera2.
Package camera2 provides Go bindings for android.hardware.camera2.
camera2/params
Package params provides Go bindings for android.hardware.camera2.params.
Package params provides Go bindings for android.hardware.camera2.params.
display
Package display provides Go bindings for android.hardware.display.
Package display provides Go bindings for android.hardware.display.
fingerprint
Package fingerprint provides Go bindings for android.hardware.fingerprint.
Package fingerprint provides Go bindings for android.hardware.fingerprint.
input
Package input provides Go bindings for android.hardware.input.
Package input provides Go bindings for android.hardware.input.
ir
Package ir provides Go bindings for android.hardware.
Package ir provides Go bindings for android.hardware.
lights
Package lights provides Go bindings for android.hardware.lights.
Package lights provides Go bindings for android.hardware.lights.
usb
Package usb provides Go bindings for android.hardware.usb.
Package usb provides Go bindings for android.hardware.usb.
health
connect
Package connect provides Go bindings for android.health.connect.
Package connect provides Go bindings for android.health.connect.
connect/changelog
Package changelog provides Go bindings for android.health.connect.changelog.
Package changelog provides Go bindings for android.health.connect.changelog.
connect/datatypes
Package datatypes provides Go bindings for android.health.connect.datatypes.
Package datatypes provides Go bindings for android.health.connect.datatypes.
connect/datatypes/units
Package units provides Go bindings for android.health.connect.datatypes.units.
Package units provides Go bindings for android.health.connect.datatypes.units.
icu
lang
Package lang provides Go bindings for android.icu.lang.
Package lang provides Go bindings for android.icu.lang.
math
Package math provides Go bindings for android.icu.math.
Package math provides Go bindings for android.icu.math.
number
Package number provides Go bindings for android.icu.number.
Package number provides Go bindings for android.icu.number.
text
Package text provides Go bindings for android.icu.text.
Package text provides Go bindings for android.icu.text.
util
Package util provides Go bindings for android.icu.util.
Package util provides Go bindings for android.icu.util.
Package inputmethodservice provides Go bindings for android.inputmethodservice.
Package inputmethodservice provides Go bindings for android.inputmethodservice.
internal
jnierr
Package jnierr provides JNI exception-to-Go-error conversion.
Package jnierr provides JNI exception-to-Go-error conversion.
testjvm
Package testjvm creates and manages a JVM instance for use in tests.
Package testjvm creates and manages a JVM instance for use in tests.
Package location provides Go bindings for android.location.
Package location provides Go bindings for android.location.
altitude
Package altitude provides Go bindings for android.location.altitude.
Package altitude provides Go bindings for android.location.altitude.
provider
Package provider provides Go bindings for android.location.provider.
Package provider provides Go bindings for android.location.provider.
Package media provides Go bindings for android.media.
Package media provides Go bindings for android.media.
audiofx
Package audiofx provides Go bindings for android.media.audiofx.
Package audiofx provides Go bindings for android.media.audiofx.
audiomanager
Package audiomanager provides Go bindings for android.media.
Package audiomanager provides Go bindings for android.media.
audiorecord
Package audiorecord provides Go bindings for android.media.
Package audiorecord provides Go bindings for android.media.
browse
Package browse provides Go bindings for android.media.browse.
Package browse provides Go bindings for android.media.browse.
effect
Package effect provides Go bindings for android.media.effect.
Package effect provides Go bindings for android.media.effect.
metrics
Package metrics provides Go bindings for android.media.metrics.
Package metrics provides Go bindings for android.media.metrics.
midi
Package midi provides Go bindings for android.media.midi.
Package midi provides Go bindings for android.media.midi.
player
Package player provides Go bindings for android.media.
Package player provides Go bindings for android.media.
projection
Package projection provides Go bindings for android.media.projection.
Package projection provides Go bindings for android.media.projection.
quality
Package quality provides Go bindings for android.media.quality.
Package quality provides Go bindings for android.media.quality.
recorder
Package recorder provides Go bindings for android.media.
Package recorder provides Go bindings for android.media.
ringtone
Package ringtone provides Go bindings for android.media.
Package ringtone provides Go bindings for android.media.
session
Package session provides Go bindings for android.media.session.
Package session provides Go bindings for android.media.session.
tv
Package tv provides Go bindings for android.media.tv.
Package tv provides Go bindings for android.media.tv.
tv/ad
Package ad provides Go bindings for android.media.tv.ad.
Package ad provides Go bindings for android.media.tv.ad.
tv/interactive
Package interactive provides Go bindings for android.media.tv.interactive.
Package interactive provides Go bindings for android.media.tv.interactive.
mtp
Package mtp provides Go bindings for android.mtp.
Package mtp provides Go bindings for android.mtp.
net
Package net provides Go bindings for android.net.
Package net provides Go bindings for android.net.
eap
Package eap provides Go bindings for android.net.eap.
Package eap provides Go bindings for android.net.eap.
http
Package http provides Go bindings for android.net.http.
Package http provides Go bindings for android.net.http.
ipsec/ike
Package ike provides Go bindings for android.net.ipsec.ike.
Package ike provides Go bindings for android.net.ipsec.ike.
ipsec/ike/exceptions
Package exceptions provides Go bindings for android.net.ipsec.ike.exceptions.
Package exceptions provides Go bindings for android.net.ipsec.ike.exceptions.
nsd
Package nsd provides Go bindings for android.net.nsd.
Package nsd provides Go bindings for android.net.nsd.
rtp
Package rtp provides Go bindings for android.net.rtp.
Package rtp provides Go bindings for android.net.rtp.
sip
Package sip provides Go bindings for android.net.sip.
Package sip provides Go bindings for android.net.sip.
ssl
Package ssl provides Go bindings for android.net.ssl.
Package ssl provides Go bindings for android.net.ssl.
vcn
Package vcn provides Go bindings for android.net.vcn.
Package vcn provides Go bindings for android.net.vcn.
vpn
Package vpn provides Go bindings for android.net.
Package vpn provides Go bindings for android.net.
wifi
Package wifi provides Go bindings for android.net.wifi.
Package wifi provides Go bindings for android.net.wifi.
wifi/aware
Package aware provides Go bindings for android.net.wifi.aware.
Package aware provides Go bindings for android.net.wifi.aware.
wifi/hotspot2
Package hotspot2 provides Go bindings for android.net.wifi.hotspot2.
Package hotspot2 provides Go bindings for android.net.wifi.hotspot2.
wifi/hotspot2/omadm
Package omadm provides Go bindings for android.net.wifi.hotspot2.omadm.
Package omadm provides Go bindings for android.net.wifi.hotspot2.omadm.
wifi/hotspot2/pps
Package pps provides Go bindings for android.net.wifi.hotspot2.pps.
Package pps provides Go bindings for android.net.wifi.hotspot2.pps.
wifi/p2p
Package p2p provides Go bindings for android.net.wifi.p2p.
Package p2p provides Go bindings for android.net.wifi.p2p.
wifi/p2p/nsd
Package nsd provides Go bindings for android.net.wifi.p2p.nsd.
Package nsd provides Go bindings for android.net.wifi.p2p.nsd.
wifi/rtt
Package rtt provides Go bindings for android.net.wifi.rtt.
Package rtt provides Go bindings for android.net.wifi.rtt.
nfc
Package nfc provides Go bindings for android.nfc.
Package nfc provides Go bindings for android.nfc.
cardemulation
Package cardemulation provides Go bindings for android.nfc.cardemulation.
Package cardemulation provides Go bindings for android.nfc.cardemulation.
tech
Package tech provides Go bindings for android.nfc.tech.
Package tech provides Go bindings for android.nfc.tech.
Package opengl provides Go bindings for android.opengl.
Package opengl provides Go bindings for android.opengl.
os
Package os provides Go bindings for android.os.
Package os provides Go bindings for android.os.
battery
Package battery provides Go bindings for android.os.
Package battery provides Go bindings for android.os.
build
Package build provides Go bindings for android.os.
Package build provides Go bindings for android.os.
environment
Package environment provides Go bindings for android.os.
Package environment provides Go bindings for android.os.
ext
Package ext provides Go bindings for android.os.ext.
Package ext provides Go bindings for android.os.ext.
flagging
Package flagging provides Go bindings for android.os.flagging.
Package flagging provides Go bindings for android.os.flagging.
health
Package health provides Go bindings for android.os.health.
Package health provides Go bindings for android.os.health.
keyguard
Package keyguard provides Go bindings for android.app.
Package keyguard provides Go bindings for android.app.
power
Package power provides Go bindings for android.os.
Package power provides Go bindings for android.os.
storage
Package storage provides Go bindings for android.os.storage.
Package storage provides Go bindings for android.os.storage.
strictmode
Package strictmode provides Go bindings for android.os.strictmode.
Package strictmode provides Go bindings for android.os.strictmode.
vibrator
Package vibrator provides Go bindings for android.os.
Package vibrator provides Go bindings for android.os.
Package preference provides Go bindings for android.preference.
Package preference provides Go bindings for android.preference.
Package print provides Go bindings for android.print.
Package print provides Go bindings for android.print.
pdf
Package pdf provides Go bindings for android.print.pdf.
Package pdf provides Go bindings for android.print.pdf.
Package printservice provides Go bindings for android.printservice.
Package printservice provides Go bindings for android.printservice.
Package provider provides Go bindings for android.provider.
Package provider provides Go bindings for android.provider.
calendar
Package calendar provides Go bindings for android.provider.
Package calendar provides Go bindings for android.provider.
contacts
Package contacts provides Go bindings for android.provider.
Package contacts provides Go bindings for android.provider.
documents
Package documents provides Go bindings for android.provider.
Package documents provides Go bindings for android.provider.
media
Package media provides Go bindings for android.provider.
Package media provides Go bindings for android.provider.
settings
Package settings provides Go bindings for android.provider.
Package settings provides Go bindings for android.provider.
Package ranging provides Go bindings for android.ranging.
Package ranging provides Go bindings for android.ranging.
ble/cs
Package cs provides Go bindings for android.ranging.ble.cs.
Package cs provides Go bindings for android.ranging.ble.cs.
ble/rssi
Package rssi provides Go bindings for android.ranging.ble.rssi.
Package rssi provides Go bindings for android.ranging.ble.rssi.
oob
Package oob provides Go bindings for android.ranging.oob.
Package oob provides Go bindings for android.ranging.oob.
raw
Package raw provides Go bindings for android.ranging.raw.
Package raw provides Go bindings for android.ranging.raw.
uwb
Package uwb provides Go bindings for android.ranging.uwb.
Package uwb provides Go bindings for android.ranging.uwb.
wifi/rtt
Package rtt provides Go bindings for android.ranging.wifi.rtt.
Package rtt provides Go bindings for android.ranging.wifi.rtt.
Package renderscript provides Go bindings for android.renderscript.
Package renderscript provides Go bindings for android.renderscript.
Package sax provides Go bindings for android.sax.
Package sax provides Go bindings for android.sax.
se
omapi
Package omapi provides Go bindings for android.se.omapi.
Package omapi provides Go bindings for android.se.omapi.
Package security provides Go bindings for android.security.
Package security provides Go bindings for android.security.
advancedprotection
Package advancedprotection provides Go bindings for android.security.advancedprotection.
Package advancedprotection provides Go bindings for android.security.advancedprotection.
identity
Package identity provides Go bindings for android.security.identity.
Package identity provides Go bindings for android.security.identity.
keystore
Package keystore provides Go bindings for android.security.keystore.
Package keystore provides Go bindings for android.security.keystore.
service
assist/classification
Package classification provides Go bindings for android.service.assist.classification.
Package classification provides Go bindings for android.service.assist.classification.
autofill
Package autofill provides Go bindings for android.service.autofill.
Package autofill provides Go bindings for android.service.autofill.
carrier
Package carrier provides Go bindings for android.service.carrier.
Package carrier provides Go bindings for android.service.carrier.
chooser
Package chooser provides Go bindings for android.service.chooser.
Package chooser provides Go bindings for android.service.chooser.
controls
Package controls provides Go bindings for android.service.controls.
Package controls provides Go bindings for android.service.controls.
controls/actions
Package actions provides Go bindings for android.service.controls.actions.
Package actions provides Go bindings for android.service.controls.actions.
controls/templates
Package templates provides Go bindings for android.service.controls.templates.
Package templates provides Go bindings for android.service.controls.templates.
credentials
Package credentials provides Go bindings for android.service.credentials.
Package credentials provides Go bindings for android.service.credentials.
dreams
Package dreams provides Go bindings for android.service.dreams.
Package dreams provides Go bindings for android.service.dreams.
media
Package media provides Go bindings for android.service.media.
Package media provides Go bindings for android.service.media.
notification
Package notification provides Go bindings for android.service.notification.
Package notification provides Go bindings for android.service.notification.
persistentdata
Package persistentdata provides Go bindings for android.service.persistentdata.
Package persistentdata provides Go bindings for android.service.persistentdata.
quickaccesswallet
Package quickaccesswallet provides Go bindings for android.service.quickaccesswallet.
Package quickaccesswallet provides Go bindings for android.service.quickaccesswallet.
quicksettings
Package quicksettings provides Go bindings for android.service.quicksettings.
Package quicksettings provides Go bindings for android.service.quicksettings.
restrictions
Package restrictions provides Go bindings for android.service.restrictions.
Package restrictions provides Go bindings for android.service.restrictions.
settings/preferences
Package preferences provides Go bindings for android.service.settings.preferences.
Package preferences provides Go bindings for android.service.settings.preferences.
textservice
Package textservice provides Go bindings for android.service.textservice.
Package textservice provides Go bindings for android.service.textservice.
voice
Package voice provides Go bindings for android.service.voice.
Package voice provides Go bindings for android.service.voice.
vr
Package vr provides Go bindings for android.service.vr.
Package vr provides Go bindings for android.service.vr.
wallpaper
Package wallpaper provides Go bindings for android.service.wallpaper.
Package wallpaper provides Go bindings for android.service.wallpaper.
Package spec embeds the Java API spec and overlay YAML files.
Package spec embeds the Java API spec and overlay YAML files.
Package speech provides Go bindings for android.speech.
Package speech provides Go bindings for android.speech.
tts
Package tts provides Go bindings for android.speech.tts.
Package tts provides Go bindings for android.speech.tts.
Package system provides Go bindings for android.system.
Package system provides Go bindings for android.system.
Package telecom provides Go bindings for android.telecom.
Package telecom provides Go bindings for android.telecom.
Package telephony provides Go bindings for android.telephony.
Package telephony provides Go bindings for android.telephony.
cdma
Package cdma provides Go bindings for android.telephony.cdma.
Package cdma provides Go bindings for android.telephony.cdma.
data
Package data provides Go bindings for android.telephony.data.
Package data provides Go bindings for android.telephony.data.
emergency
Package emergency provides Go bindings for android.telephony.emergency.
Package emergency provides Go bindings for android.telephony.emergency.
euicc
Package euicc provides Go bindings for android.telephony.euicc.
Package euicc provides Go bindings for android.telephony.euicc.
gsm
Package gsm provides Go bindings for android.telephony.gsm.
Package gsm provides Go bindings for android.telephony.gsm.
ims
Package ims provides Go bindings for android.telephony.ims.
Package ims provides Go bindings for android.telephony.ims.
ims/feature
Package feature provides Go bindings for android.telephony.ims.feature.
Package feature provides Go bindings for android.telephony.ims.feature.
ims/stub
Package stub provides Go bindings for android.telephony.ims.stub.
Package stub provides Go bindings for android.telephony.ims.stub.
mbms
Package mbms provides Go bindings for android.telephony.mbms.
Package mbms provides Go bindings for android.telephony.mbms.
satellite
Package satellite provides Go bindings for android.telephony.satellite.
Package satellite provides Go bindings for android.telephony.satellite.
Package templates provides Go bindings for android.service.controls.templates.
Package templates provides Go bindings for android.service.controls.templates.
Package text provides Go bindings for android.text.
Package text provides Go bindings for android.text.
format
Package format provides Go bindings for android.text.format.
Package format provides Go bindings for android.text.format.
method
Package method provides Go bindings for android.text.method.
Package method provides Go bindings for android.text.method.
style
Package style provides Go bindings for android.text.style.
Package style provides Go bindings for android.text.style.
util
Package util provides Go bindings for android.text.util.
Package util provides Go bindings for android.text.util.
tools
cmd/javagen command
cmd/jnigen command
cmd/specgen command
pkg/specgen
Package specgen generates Java API YAML specs from .class files using javap.
Package specgen generates Java API YAML specs from .class files using javap.
Package transition provides Go bindings for android.transition.
Package transition provides Go bindings for android.transition.
Package util provides Go bindings for android.util.
Package util provides Go bindings for android.util.
proto
Package proto provides Go bindings for android.util.proto.
Package proto provides Go bindings for android.util.proto.
Package view provides Go bindings for android.view.
Package view provides Go bindings for android.view.
accessibility
Package accessibility provides Go bindings for android.view.accessibility.
Package accessibility provides Go bindings for android.view.accessibility.
animation
Package animation provides Go bindings for android.view.animation.
Package animation provides Go bindings for android.view.animation.
autofill
Package autofill provides Go bindings for android.view.autofill.
Package autofill provides Go bindings for android.view.autofill.
contentcapture
Package contentcapture provides Go bindings for android.view.contentcapture.
Package contentcapture provides Go bindings for android.view.contentcapture.
display
Package display provides Go bindings for android.view.
Package display provides Go bindings for android.view.
displayhash
Package displayhash provides Go bindings for android.view.displayhash.
Package displayhash provides Go bindings for android.view.displayhash.
inputmethod
Package inputmethod provides Go bindings for android.view.inputmethod.
Package inputmethod provides Go bindings for android.view.inputmethod.
inspector
Package inspector provides Go bindings for android.view.inspector.
Package inspector provides Go bindings for android.view.inspector.
textclassifier
Package textclassifier provides Go bindings for android.view.textclassifier.
Package textclassifier provides Go bindings for android.view.textclassifier.
textservice
Package textservice provides Go bindings for android.view.textservice.
Package textservice provides Go bindings for android.view.textservice.
translation
Package translation provides Go bindings for android.view.translation.
Package translation provides Go bindings for android.view.translation.
Package webkit provides Go bindings for android.webkit.
Package webkit provides Go bindings for android.webkit.
Package widget provides Go bindings for android.widget.
Package widget provides Go bindings for android.widget.
inline
Package inline provides Go bindings for android.widget.inline.
Package inline provides Go bindings for android.widget.inline.
photopicker
Package photopicker provides Go bindings for android.widget.photopicker.
Package photopicker provides Go bindings for android.widget.photopicker.
toast
Package toast provides Go bindings for android.widget.
Package toast provides Go bindings for android.widget.
Package window provides Go bindings for android.window.
Package window provides Go bindings for android.window.

Jump to

Keyboard shortcuts

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