role

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Overview

Package role provides Go bindings for android.app.role.

Index

Constants

View Source
const (
	RoleAssistant       = consts.RoleAssistant
	RoleBrowser         = consts.RoleBrowser
	RoleCallRedirection = consts.RoleCallRedirection
	RoleCallScreening   = consts.RoleCallScreening
	RoleDialer          = consts.RoleDialer
	RoleEmergency       = consts.RoleEmergency
	RoleHome            = consts.RoleHome
	RoleNotes           = consts.RoleNotes
	RoleSms             = consts.RoleSms
	RoleWallet          = consts.RoleWallet
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type Manager added in v0.0.4

type Manager struct {
	VM  *jni.VM
	Ctx *app.Context
	Obj *jni.GlobalRef
}

Manager wraps android.app.role.RoleManager.

func NewManager added in v0.0.4

func NewManager(ctx *app.Context) (*Manager, error)

NewManager obtains android.app.role.RoleManager from the Android system service manager.

func (*Manager) Close added in v0.0.4

func (m *Manager) Close()

Close releases the global reference to the underlying Java object. After Close, the Manager must not be used.

func (*Manager) CreateRequestRoleIntent added in v0.0.4

func (m *Manager) CreateRequestRoleIntent(arg0 string) (*jni.Object, error)

CreateRequestRoleIntent calls android.app.role.RoleManager.createRequestRoleIntent.

func (*Manager) IsRoleAvailable added in v0.0.4

func (m *Manager) IsRoleAvailable(arg0 string) (bool, error)

IsRoleAvailable calls android.app.role.RoleManager.isRoleAvailable.

func (*Manager) IsRoleHeld added in v0.0.4

func (m *Manager) IsRoleHeld(arg0 string) (bool, error)

IsRoleHeld calls android.app.role.RoleManager.isRoleHeld.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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