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
- Variables
- func EnsureProxyInit(env *Env) error
- func RegisterProxyHandler(h ProxyHandler) int64
- func SetProxyClassLoader(cl *Object)
- func UnregisterProxyHandler(id int64)
- type Array
- type BooleanArray
- type ByteArray
- type CAPIObject
- type CharArray
- type Class
- type DoubleArray
- type Env
- func (e *Env) AllocObject(cls *Class) (*Object, error)
- func (e *Env) CallBooleanMethod(obj *Object, method MethodID, args ...Value) (uint8, error)
- func (e *Env) CallByteMethod(obj *Object, method MethodID, args ...Value) (int8, error)
- func (e *Env) CallCharMethod(obj *Object, method MethodID, args ...Value) (uint16, error)
- func (e *Env) CallDoubleMethod(obj *Object, method MethodID, args ...Value) (float64, error)
- func (e *Env) CallFloatMethod(obj *Object, method MethodID, args ...Value) (float32, error)
- func (e *Env) CallIntMethod(obj *Object, method MethodID, args ...Value) (int32, error)
- func (e *Env) CallLongMethod(obj *Object, method MethodID, args ...Value) (int64, error)
- func (e *Env) CallNonvirtualBooleanMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint8, error)
- func (e *Env) CallNonvirtualByteMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int8, error)
- func (e *Env) CallNonvirtualCharMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint16, error)
- func (e *Env) CallNonvirtualDoubleMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float64, error)
- func (e *Env) CallNonvirtualFloatMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float32, error)
- func (e *Env) CallNonvirtualIntMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int32, error)
- func (e *Env) CallNonvirtualLongMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int64, error)
- func (e *Env) CallNonvirtualObjectMethod(obj *Object, cls *Class, method MethodID, args ...Value) (*Object, error)
- func (e *Env) CallNonvirtualShortMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int16, error)
- func (e *Env) CallNonvirtualVoidMethod(obj *Object, cls *Class, method MethodID, args ...Value) error
- func (e *Env) CallObjectMethod(obj *Object, method MethodID, args ...Value) (*Object, error)
- func (e *Env) CallShortMethod(obj *Object, method MethodID, args ...Value) (int16, error)
- func (e *Env) CallStaticBooleanMethod(cls *Class, method MethodID, args ...Value) (uint8, error)
- func (e *Env) CallStaticByteMethod(cls *Class, method MethodID, args ...Value) (int8, error)
- func (e *Env) CallStaticCharMethod(cls *Class, method MethodID, args ...Value) (uint16, error)
- func (e *Env) CallStaticDoubleMethod(cls *Class, method MethodID, args ...Value) (float64, error)
- func (e *Env) CallStaticFloatMethod(cls *Class, method MethodID, args ...Value) (float32, error)
- func (e *Env) CallStaticIntMethod(cls *Class, method MethodID, args ...Value) (int32, error)
- func (e *Env) CallStaticLongMethod(cls *Class, method MethodID, args ...Value) (int64, error)
- func (e *Env) CallStaticObjectMethod(cls *Class, method MethodID, args ...Value) (*Object, error)
- func (e *Env) CallStaticShortMethod(cls *Class, method MethodID, args ...Value) (int16, error)
- func (e *Env) CallStaticVoidMethod(cls *Class, method MethodID, args ...Value) error
- func (e *Env) CallVoidMethod(obj *Object, method MethodID, args ...Value) error
- func (e *Env) DefineClass(name string, loader *Object, buf []byte) (*Class, error)
- func (e *Env) DeleteGlobalRef(globalRef *Object)
- func (e *Env) DeleteLocalRef(localRef *Object)
- func (e *Env) DeleteWeakGlobalRef(ref *WeakRef)
- func (e *Env) EnsureLocalCapacity(capacity int32) error
- func (e *Env) ExceptionCheck() bool
- func (e *Env) ExceptionClear()
- func (e *Env) ExceptionDescribe()
- func (e *Env) ExceptionOccurred() *Throwable
- func (e *Env) FatalError(msg string)
- func (e *Env) FindClass(name string) (*Class, error)
- func (e *Env) FromReflectedField(field *Object) FieldID
- func (e *Env) FromReflectedMethod(method *Object) MethodID
- func (e *Env) GetArrayLength(array *Array) int32
- func (e *Env) GetBooleanArrayElements(array *BooleanArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetBooleanField(obj *Object, field FieldID) uint8
- func (e *Env) GetByteArrayElements(array *ByteArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetByteArrayRegion(array *ByteArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetByteField(obj *Object, field FieldID) int8
- func (e *Env) GetCharArrayElements(array *CharArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetCharArrayRegion(array *CharArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetCharField(obj *Object, field FieldID) uint16
- func (e *Env) GetDirectBufferAddress(buf *Object) unsafe.Pointer
- func (e *Env) GetDirectBufferCapacity(buf *Object) int64
- func (e *Env) GetDoubleArrayElements(array *DoubleArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetDoubleArrayRegion(array *DoubleArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetDoubleField(obj *Object, field FieldID) float64
- func (e *Env) GetFieldID(cls *Class, name string, sig string) (FieldID, error)
- func (e *Env) GetFloatArrayElements(array *FloatArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetFloatArrayRegion(array *FloatArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetFloatField(obj *Object, field FieldID) float32
- func (e *Env) GetIntArrayElements(array *IntArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetIntArrayRegion(array *IntArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetIntField(obj *Object, field FieldID) int32
- func (e *Env) GetLongArrayElements(array *LongArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetLongArrayRegion(array *LongArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetLongField(obj *Object, field FieldID) int64
- func (e *Env) GetMethodID(cls *Class, name string, sig string) (MethodID, error)
- func (e *Env) GetObjectArrayElement(array *ObjectArray, index int32) (*Object, error)
- func (e *Env) GetObjectClass(obj *Object) *Class
- func (e *Env) GetObjectField(obj *Object, field FieldID) *Object
- func (e *Env) GetObjectRefType(obj *Object) ObjectRefType
- func (e *Env) GetPrimitiveArrayCritical(array *Array, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetShortArrayElements(array *ShortArray, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetShortArrayRegion(array *ShortArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) GetShortField(obj *Object, field FieldID) int16
- func (e *Env) GetStaticBooleanField(cls *Class, field FieldID) uint8
- func (e *Env) GetStaticByteField(cls *Class, field FieldID) int8
- func (e *Env) GetStaticCharField(cls *Class, field FieldID) uint16
- func (e *Env) GetStaticDoubleField(cls *Class, field FieldID) float64
- func (e *Env) GetStaticFieldID(cls *Class, name string, sig string) (FieldID, error)
- func (e *Env) GetStaticFloatField(cls *Class, field FieldID) float32
- func (e *Env) GetStaticIntField(cls *Class, field FieldID) int32
- func (e *Env) GetStaticLongField(cls *Class, field FieldID) int64
- func (e *Env) GetStaticMethodID(cls *Class, name string, sig string) (MethodID, error)
- func (e *Env) GetStaticObjectField(cls *Class, field FieldID) *Object
- func (e *Env) GetStaticShortField(cls *Class, field FieldID) int16
- func (e *Env) GetStringChars(str *String, isCopy *uint8) (unsafe.Pointer, error)
- func (e *Env) GetStringCritical(str *String, isCopy *uint8) unsafe.Pointer
- func (e *Env) GetStringLength(str *String) int32
- func (e *Env) GetStringRegion(str *String, start int32, len int32, buf []uint16) error
- func (e *Env) GetStringUTFChars(str *String, isCopy *uint8) (unsafe.Pointer, error)
- func (e *Env) GetStringUTFLength(str *String) int32
- func (e *Env) GetStringUTFRegion(str *String, start int32, len int32, buf []byte) error
- func (e *Env) GetSuperclass(cls *Class) *Class
- func (e *Env) GetVersion() int32
- func (e *Env) GoString(str *String) string
- func (e *Env) IsAssignableFrom(cls1 *Class, cls2 *Class) bool
- func (e *Env) IsInstanceOf(obj *Object, cls *Class) bool
- func (e *Env) IsSameObject(ref1 *Object, ref2 *Object) bool
- func (e *Env) MonitorEnter(obj *Object) error
- func (e *Env) MonitorExit(obj *Object) error
- func (e *Env) NewBooleanArray(length int32) *BooleanArray
- func (e *Env) NewByteArray(length int32) *ByteArray
- func (e *Env) NewCharArray(length int32) *CharArray
- func (e *Env) NewDirectByteBuffer(address unsafe.Pointer, capacity int64) *Object
- func (e *Env) NewDoubleArray(length int32) *DoubleArray
- func (e *Env) NewFloatArray(length int32) *FloatArray
- func (e *Env) NewGlobalRef(obj *Object) *Object
- func (e *Env) NewIntArray(length int32) *IntArray
- func (e *Env) NewLocalRef(obj *Object) *Object
- func (e *Env) NewLongArray(length int32) *LongArray
- func (e *Env) NewObject(cls *Class, method MethodID, args ...Value) (*Object, error)
- func (e *Env) NewObjectArray(length int32, elementClass *Class, initialElement *Object) (*ObjectArray, error)
- func (e *Env) NewProxy(ifaces []*Class, ...) (proxy *Object, cleanup func(), err error)
- func (e *Env) NewProxyFull(ifaces []*Class, handler ProxyHandlerFull) (proxy *Object, cleanup func(), err error)
- func (e *Env) NewShortArray(length int32) *ShortArray
- func (e *Env) NewString(unicodeChars []uint16) (*String, error)
- func (e *Env) NewStringUTF(bytes string) (*String, error)
- func (e *Env) NewWeakGlobalRef(obj *Object) *WeakRef
- func (e *Env) PopLocalFrame(result *Object) *Object
- func (e *Env) Ptr() unsafe.Pointer
- func (e *Env) PushLocalFrame(capacity int32) error
- func (e *Env) RegisterNatives(cls *Class, methods unsafe.Pointer, nMethods int32) error
- func (e *Env) ReleaseBooleanArrayElements(array *BooleanArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseByteArrayElements(array *ByteArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseCharArrayElements(array *CharArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseDoubleArrayElements(array *DoubleArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseFloatArrayElements(array *FloatArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseIntArrayElements(array *IntArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseLongArrayElements(array *LongArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleasePrimitiveArrayCritical(array *Array, carray unsafe.Pointer, mode int32)
- func (e *Env) ReleaseShortArrayElements(array *ShortArray, elems unsafe.Pointer, mode int32)
- func (e *Env) ReleaseStringChars(str *String, chars unsafe.Pointer)
- func (e *Env) ReleaseStringCritical(str *String, cstr unsafe.Pointer)
- func (e *Env) ReleaseStringUTFChars(str *String, utf unsafe.Pointer)
- func (e *Env) SetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetBooleanField(obj *Object, field FieldID, value uint8)
- func (e *Env) SetByteArrayRegion(array *ByteArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetByteField(obj *Object, field FieldID, value int8)
- func (e *Env) SetCharArrayRegion(array *CharArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetCharField(obj *Object, field FieldID, value uint16)
- func (e *Env) SetDoubleArrayRegion(array *DoubleArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetDoubleField(obj *Object, field FieldID, value float64)
- func (e *Env) SetFloatArrayRegion(array *FloatArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetFloatField(obj *Object, field FieldID, value float32)
- func (e *Env) SetIntArrayRegion(array *IntArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetIntField(obj *Object, field FieldID, value int32)
- func (e *Env) SetLongArrayRegion(array *LongArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetLongField(obj *Object, field FieldID, value int64)
- func (e *Env) SetObjectArrayElement(array *ObjectArray, index int32, value *Object) error
- func (e *Env) SetObjectField(obj *Object, field FieldID, value *Object)
- func (e *Env) SetShortArrayRegion(array *ShortArray, start int32, len int32, buf unsafe.Pointer)
- func (e *Env) SetShortField(obj *Object, field FieldID, value int16)
- func (e *Env) SetStaticBooleanField(cls *Class, field FieldID, value uint8)
- func (e *Env) SetStaticByteField(cls *Class, field FieldID, value int8)
- func (e *Env) SetStaticCharField(cls *Class, field FieldID, value uint16)
- func (e *Env) SetStaticDoubleField(cls *Class, field FieldID, value float64)
- func (e *Env) SetStaticFloatField(cls *Class, field FieldID, value float32)
- func (e *Env) SetStaticIntField(cls *Class, field FieldID, value int32)
- func (e *Env) SetStaticLongField(cls *Class, field FieldID, value int64)
- func (e *Env) SetStaticObjectField(cls *Class, field FieldID, value *Object)
- func (e *Env) SetStaticShortField(cls *Class, field FieldID, value int16)
- func (e *Env) Throw(throwable *Throwable) error
- func (e *Env) ThrowNew(cls *Class, message string) error
- func (e *Env) ToReflectedField(cls *Class, field FieldID, isStatic bool) *Object
- func (e *Env) ToReflectedMethod(cls *Class, method MethodID, isStatic bool) *Object
- func (e *Env) UnregisterNatives(cls *Class) error
- type Error
- type FieldID
- type FloatArray
- type GlobalRef
- type IntArray
- type LongArray
- type MethodID
- type Object
- type ObjectArray
- type ObjectRefType
- type ProxyHandler
- type ProxyHandlerFull
- type ShortArray
- type String
- type Throwable
- type VM
- type Value
- type WeakRef
Constants ¶
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.
const ( JNI_FALSE = capi.JNI_FALSE JNI_TRUE = capi.JNI_TRUE )
JNI boolean constants.
const ( JNI_COMMIT = capi.JNI_COMMIT JNI_ABORT = capi.JNI_ABORT )
JNI array release mode constants.
const ( JNIInvalidRefType = capi.JNIInvalidRefType JNILocalRefType = capi.JNILocalRefType JNIGlobalRefType = capi.JNIGlobalRefType JNIWeakGlobalRefType = capi.JNIWeakGlobalRefType )
JNI object reference type constants.
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 ¶
var ErrDetached = Error(JNI_EDETACHED)
ErrDetached is returned by VM.GetEnv when the current thread is not attached to the JVM.
Functions ¶
func EnsureProxyInit ¶
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 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 ¶
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 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 ¶
EnvFromPtr creates an Env from a raw JNIEnv pointer.
func EnvFromUintptr ¶ added in v0.0.6
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
DeleteGlobalRef wraps the JNI DeleteGlobalRef function.
func (*Env) DeleteLocalRef ¶
DeleteLocalRef wraps the JNI DeleteLocalRef function.
func (*Env) DeleteWeakGlobalRef ¶
DeleteWeakGlobalRef wraps the JNI DeleteWeakGlobalRef function.
func (*Env) EnsureLocalCapacity ¶
EnsureLocalCapacity wraps the JNI EnsureLocalCapacity function.
func (*Env) ExceptionCheck ¶
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 ¶
ExceptionOccurred wraps the JNI ExceptionOccurred function.
func (*Env) FatalError ¶
FatalError wraps the JNI FatalError function.
func (*Env) FindClass ¶
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 ¶
FromReflectedField wraps the JNI FromReflectedField function.
func (*Env) FromReflectedMethod ¶
FromReflectedMethod wraps the JNI FromReflectedMethod function.
func (*Env) GetArrayLength ¶
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 ¶
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 ¶
GetByteArrayElements wraps the JNI GetByteArrayElements function.
func (*Env) GetByteArrayRegion ¶
GetByteArrayRegion wraps the JNI GetByteArrayRegion function.
func (*Env) GetByteField ¶
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 ¶
GetCharArrayElements wraps the JNI GetCharArrayElements function.
func (*Env) GetCharArrayRegion ¶
GetCharArrayRegion wraps the JNI GetCharArrayRegion function.
func (*Env) GetCharField ¶
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 ¶
GetDirectBufferAddress wraps the JNI GetDirectBufferAddress function.
func (*Env) GetDirectBufferCapacity ¶
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 ¶
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 ¶
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 ¶
GetFloatArrayRegion wraps the JNI GetFloatArrayRegion function.
func (*Env) GetFloatField ¶
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 ¶
GetIntArrayElements wraps the JNI GetIntArrayElements function.
func (*Env) GetIntArrayRegion ¶
GetIntArrayRegion wraps the JNI GetIntArrayRegion function.
func (*Env) GetIntField ¶
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 ¶
GetLongArrayElements wraps the JNI GetLongArrayElements function.
func (*Env) GetLongArrayRegion ¶
GetLongArrayRegion wraps the JNI GetLongArrayRegion function.
func (*Env) GetLongField ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
GetShortArrayRegion wraps the JNI GetShortArrayRegion function.
func (*Env) GetShortField ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
GetStringChars wraps the JNI GetStringChars function.
func (*Env) GetStringCritical ¶
GetStringCritical wraps the JNI GetStringCritical function.
func (*Env) GetStringLength ¶
GetStringLength wraps the JNI GetStringLength function.
func (*Env) GetStringRegion ¶
GetStringRegion wraps the JNI GetStringRegion function.
func (*Env) GetStringUTFChars ¶
GetStringUTFChars wraps the JNI GetStringUTFChars function.
func (*Env) GetStringUTFLength ¶
GetStringUTFLength wraps the JNI GetStringUTFLength function.
func (*Env) GetStringUTFRegion ¶
GetStringUTFRegion wraps the JNI GetStringUTFRegion function.
func (*Env) GetSuperclass ¶
GetSuperclass wraps the JNI GetSuperclass function.
func (*Env) GetVersion ¶
GetVersion wraps the JNI GetVersion function.
func (*Env) GoString ¶
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 ¶
IsAssignableFrom wraps the JNI IsAssignableFrom function.
func (*Env) IsInstanceOf ¶
IsInstanceOf wraps the JNI IsInstanceOf function.
func (*Env) IsSameObject ¶
IsSameObject wraps the JNI IsSameObject function.
func (*Env) MonitorEnter ¶
MonitorEnter wraps the JNI MonitorEnter function.
func (*Env) MonitorExit ¶
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 ¶
NewByteArray wraps the JNI NewByteArray function.
func (*Env) NewCharArray ¶
NewCharArray wraps the JNI NewCharArray function.
func (*Env) NewDirectByteBuffer ¶
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 ¶
NewGlobalRef wraps the JNI NewGlobalRef function.
func (*Env) NewIntArray ¶
NewIntArray wraps the JNI NewIntArray function.
func (*Env) NewLocalRef ¶
NewLocalRef wraps the JNI NewLocalRef function.
func (*Env) NewLongArray ¶
NewLongArray wraps the JNI NewLongArray function.
func (*Env) NewObject ¶
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) NewStringUTF ¶
NewStringUTF wraps the JNI NewStringUTF function.
func (*Env) NewWeakGlobalRef ¶
NewWeakGlobalRef wraps the JNI NewWeakGlobalRef function.
func (*Env) PopLocalFrame ¶
PopLocalFrame wraps the JNI PopLocalFrame function.
func (*Env) PushLocalFrame ¶
PushLocalFrame wraps the JNI PushLocalFrame function.
func (*Env) RegisterNatives ¶
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 ¶
ReleaseByteArrayElements wraps the JNI ReleaseByteArrayElements function.
func (*Env) ReleaseCharArrayElements ¶
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 ¶
ReleaseIntArrayElements wraps the JNI ReleaseIntArrayElements function.
func (*Env) ReleaseLongArrayElements ¶
ReleaseLongArrayElements wraps the JNI ReleaseLongArrayElements function.
func (*Env) ReleasePrimitiveArrayCritical ¶
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 ¶
ReleaseStringChars wraps the JNI ReleaseStringChars function.
func (*Env) ReleaseStringCritical ¶
ReleaseStringCritical wraps the JNI ReleaseStringCritical function.
func (*Env) ReleaseStringUTFChars ¶
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 ¶
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 ¶
SetByteArrayRegion wraps the JNI SetByteArrayRegion function.
func (*Env) SetByteField ¶
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 ¶
SetCharArrayRegion wraps the JNI SetCharArrayRegion function.
func (*Env) SetCharField ¶
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 ¶
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 ¶
SetFloatArrayRegion wraps the JNI SetFloatArrayRegion function.
func (*Env) SetFloatField ¶
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 ¶
SetIntArrayRegion wraps the JNI SetIntArrayRegion function.
func (*Env) SetIntField ¶
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 ¶
SetLongArrayRegion wraps the JNI SetLongArrayRegion function.
func (*Env) SetLongField ¶
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 ¶
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 ¶
SetShortArrayRegion wraps the JNI SetShortArrayRegion function.
func (*Env) SetShortField ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) ToReflectedField ¶
ToReflectedField wraps the JNI ToReflectedField function.
func (*Env) ToReflectedMethod ¶
ToReflectedMethod wraps the JNI ToReflectedMethod function.
func (*Env) UnregisterNatives ¶
UnregisterNatives wraps the JNI UnregisterNatives function.
type Error ¶
type Error int32
Error represents a JNI return code error (JNI_ERR, JNI_EDETACHED, etc.).
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 LongArray ¶
type LongArray struct {
Array
}
LongArray wraps the JNI jlongArray reference type.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object wraps the JNI jobject reference type.
func ObjectFromPtr ¶ added in v0.0.5
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 ¶
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
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.
type ObjectArray ¶
type ObjectArray struct {
Array
}
ObjectArray wraps the JNI jobjectArray reference type.
type ObjectRefType ¶
ObjectRefType represents the type of a JNI object reference.
type ProxyHandler ¶
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 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 VMFromUintptr ¶ added in v0.0.6
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 ¶
AttachCurrentThread attaches the current OS thread to the JVM and returns a valid JNIEnv pointer.
func (*VM) Do ¶
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:
- The goroutine stays on the same OS thread for the duration of fn.
- The OS thread has a valid JNIEnv (attaching if necessary).
- 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.
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 DoubleValue ¶
DoubleValue creates a Value holding a float64.
func ObjectValue ¶
ObjectValue creates a Value holding an Object reference.
Source Files
¶
- array.go
- booleanarray.go
- bytearray.go
- chararray.go
- class.go
- const.go
- doublearray.go
- env.go
- errors.go
- field_id.go
- floatarray.go
- globalref.go
- intarray.go
- longarray.go
- method_id.go
- object.go
- object_ref.go
- object_ref_type.go
- objectarray.go
- package.go
- proxy.go
- proxy_cgo.go
- proxy_handler_full.go
- shortarray.go
- string_conversion.go
- string_jni.go
- thread.go
- throwable.go
- value.go
- vm.go
- weakref.go
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. |
|
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. |
|
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. |
|
Package mtp provides Go bindings for android.mtp.
|
Package mtp provides Go bindings for android.mtp. |
|
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. |
|
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. |
|
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. |