environment

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Overview

Package environment provides Go bindings for android.os.

Index

Constants

View Source
const (
	MediaBadRemoval      = consts.MediaBadRemoval
	MediaChecking        = consts.MediaChecking
	MediaEjecting        = consts.MediaEjecting
	MediaMounted         = consts.MediaMounted
	MediaMountedReadOnly = consts.MediaMountedReadOnly
	MediaNofs            = consts.MediaNofs
	MediaRemoved         = consts.MediaRemoved
	MediaShared          = consts.MediaShared
	MediaUnknown         = consts.MediaUnknown
	MediaUnmountable     = consts.MediaUnmountable
	MediaUnmounted       = consts.MediaUnmounted
)

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 Environment added in v0.0.4

type Environment struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Environment wraps android.os.Environment.

func (*Environment) GetDataDirectory added in v0.0.4

func (m *Environment) GetDataDirectory() (*jni.Object, error)

GetDataDirectory calls android.os.Environment.getDataDirectory.

func (*Environment) GetDownloadCacheDirectory added in v0.0.4

func (m *Environment) GetDownloadCacheDirectory() (*jni.Object, error)

GetDownloadCacheDirectory calls android.os.Environment.getDownloadCacheDirectory.

func (*Environment) GetExternalStorageDirectory added in v0.0.4

func (m *Environment) GetExternalStorageDirectory() (*jni.Object, error)

GetExternalStorageDirectory calls android.os.Environment.getExternalStorageDirectory.

func (*Environment) GetExternalStoragePublicDirectory added in v0.0.4

func (m *Environment) GetExternalStoragePublicDirectory(arg0 string) (*jni.Object, error)

GetExternalStoragePublicDirectory calls android.os.Environment.getExternalStoragePublicDirectory.

func (*Environment) GetExternalStorageState0 added in v0.0.4

func (m *Environment) GetExternalStorageState0() (string, error)

GetExternalStorageState0 calls android.os.Environment.getExternalStorageState.

func (*Environment) GetExternalStorageState1_1 added in v0.0.4

func (m *Environment) GetExternalStorageState1_1(arg0 *jni.Object) (string, error)

GetExternalStorageState1_1 calls android.os.Environment.getExternalStorageState.

func (*Environment) GetRootDirectory added in v0.0.4

func (m *Environment) GetRootDirectory() (*jni.Object, error)

GetRootDirectory calls android.os.Environment.getRootDirectory.

func (*Environment) GetStorageDirectory added in v0.0.4

func (m *Environment) GetStorageDirectory() (*jni.Object, error)

GetStorageDirectory calls android.os.Environment.getStorageDirectory.

func (*Environment) GetStorageState added in v0.0.4

func (m *Environment) GetStorageState(arg0 *jni.Object) (string, error)

GetStorageState calls android.os.Environment.getStorageState.

func (*Environment) IsExternalStorageEmulated0 added in v0.0.4

func (m *Environment) IsExternalStorageEmulated0() (bool, error)

IsExternalStorageEmulated0 calls android.os.Environment.isExternalStorageEmulated.

func (*Environment) IsExternalStorageEmulated1_1 added in v0.0.4

func (m *Environment) IsExternalStorageEmulated1_1(arg0 *jni.Object) (bool, error)

IsExternalStorageEmulated1_1 calls android.os.Environment.isExternalStorageEmulated.

func (*Environment) IsExternalStorageLegacy0 added in v0.0.4

func (m *Environment) IsExternalStorageLegacy0() (bool, error)

IsExternalStorageLegacy0 calls android.os.Environment.isExternalStorageLegacy.

func (*Environment) IsExternalStorageLegacy1_1 added in v0.0.4

func (m *Environment) IsExternalStorageLegacy1_1(arg0 *jni.Object) (bool, error)

IsExternalStorageLegacy1_1 calls android.os.Environment.isExternalStorageLegacy.

func (*Environment) IsExternalStorageManager0 added in v0.0.4

func (m *Environment) IsExternalStorageManager0() (bool, error)

IsExternalStorageManager0 calls android.os.Environment.isExternalStorageManager.

func (*Environment) IsExternalStorageManager1_1 added in v0.0.4

func (m *Environment) IsExternalStorageManager1_1(arg0 *jni.Object) (bool, error)

IsExternalStorageManager1_1 calls android.os.Environment.isExternalStorageManager.

func (*Environment) IsExternalStorageRemovable0 added in v0.0.4

func (m *Environment) IsExternalStorageRemovable0() (bool, error)

IsExternalStorageRemovable0 calls android.os.Environment.isExternalStorageRemovable.

func (*Environment) IsExternalStorageRemovable1_1 added in v0.0.4

func (m *Environment) IsExternalStorageRemovable1_1(arg0 *jni.Object) (bool, error)

IsExternalStorageRemovable1_1 calls android.os.Environment.isExternalStorageRemovable.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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