Documentation
¶
Overview ¶
Package jni provides JNI helper functions for Android NativeActivity operations that have no NDK C API equivalent (permission dialogs, Toast messages, SurfaceTexture creation from Java).
This package is hand-written (not auto-generated) because JNI calls require inline C with JNIEnv method tables.
Index ¶
- func CreateSurfaceTexture(activityPtr unsafe.Pointer, texName, width, height int) unsafe.Pointer
- func FillWindowColor(windowPtr unsafe.Pointer, color uint32)
- func HasPermission(activityPtr unsafe.Pointer, permission string) bool
- func RequestPermission(activityPtr unsafe.Pointer, permission string)
- func ShowToast(activityPtr unsafe.Pointer, message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSurfaceTexture ¶
CreateSurfaceTexture creates a Java SurfaceTexture wrapping the given GL texture name and returns the native ASurfaceTexture handle as unsafe.Pointer.
func FillWindowColor ¶
FillWindowColor fills an ANativeWindow with a solid RGBA color.
func HasPermission ¶
HasPermission checks whether the activity has the given permission granted.
func RequestPermission ¶
RequestPermission shows the system permission dialog for the given permission.
Types ¶
This section is empty.