accounts

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 accounts provides Go bindings for android.accounts.

Index

Constants

View Source
const (
	ActionAccountRemoved            = consts.ActionAccountRemoved
	ActionAuthenticatorIntent       = consts.ActionAuthenticatorIntent
	AuthenticatorAttributesName     = consts.AuthenticatorAttributesName
	AuthenticatorMetaDataName       = consts.AuthenticatorMetaDataName
	KeyAccounts                     = consts.KeyAccounts
	KeyAccountAuthenticatorResponse = consts.KeyAccountAuthenticatorResponse
	KeyAccountManagerResponse       = consts.KeyAccountManagerResponse
	KeyAccountName                  = consts.KeyAccountName
	KeyAccountSessionBundle         = consts.KeyAccountSessionBundle
	KeyAccountStatusToken           = consts.KeyAccountStatusToken
	KeyAccountType                  = consts.KeyAccountType
	KeyAndroidPackageName           = consts.KeyAndroidPackageName
	KeyAuthenticatorTypes           = consts.KeyAuthenticatorTypes
	KeyAuthtoken                    = consts.KeyAuthtoken
	KeyAuthFailedMessage            = consts.KeyAuthFailedMessage
	KeyAuthTokenLabel               = consts.KeyAuthTokenLabel
	KeyBooleanResult                = consts.KeyBooleanResult
	KeyCallerPid                    = consts.KeyCallerPid
	KeyCallerUid                    = consts.KeyCallerUid
	KeyErrorCode                    = consts.KeyErrorCode
	KeyErrorMessage                 = consts.KeyErrorMessage
	KeyIntent                       = consts.KeyIntent
	KeyLastAuthenticatedTime        = consts.KeyLastAuthenticatedTime
	KeyPassword                     = consts.KeyPassword
	KeyUserdata                     = consts.KeyUserdata
	LoginAccountsChangedAction      = consts.LoginAccountsChangedAction
	PackageNameKeyLegacyNotVisible  = consts.PackageNameKeyLegacyNotVisible
	PackageNameKeyLegacyVisible     = consts.PackageNameKeyLegacyVisible
)
View Source
const (
	ErrorCodeBadArguments           = consts.ErrorCodeBadArguments
	ErrorCodeBadAuthentication      = consts.ErrorCodeBadAuthentication
	ErrorCodeBadRequest             = consts.ErrorCodeBadRequest
	ErrorCodeCanceled               = consts.ErrorCodeCanceled
	ErrorCodeInvalidResponse        = consts.ErrorCodeInvalidResponse
	ErrorCodeNetworkError           = consts.ErrorCodeNetworkError
	ErrorCodeRemoteException        = consts.ErrorCodeRemoteException
	ErrorCodeUnsupportedOperation   = consts.ErrorCodeUnsupportedOperation
	VisibilityNotVisible            = consts.VisibilityNotVisible
	VisibilityUndefined             = consts.VisibilityUndefined
	VisibilityUserManagedNotVisible = consts.VisibilityUserManagedNotVisible
	VisibilityUserManagedVisible    = consts.VisibilityUserManagedVisible
	VisibilityVisible               = consts.VisibilityVisible
	Creator                         = consts.Creator
)

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

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

Account wraps android.accounts.Account.

func (*Account) DescribeContents added in v0.0.4

func (m *Account) DescribeContents() (int32, error)

DescribeContents calls android.accounts.Account.describeContents.

func (*Account) Equals added in v0.0.4

func (m *Account) Equals(arg0 *jni.Object) (bool, error)

Equals calls android.accounts.Account.equals.

func (*Account) HashCode added in v0.0.4

func (m *Account) HashCode() (int32, error)

HashCode calls android.accounts.Account.hashCode.

func (*Account) ToString added in v0.0.4

func (m *Account) ToString() (string, error)

ToString calls android.accounts.Account.toString.

func (*Account) WriteToParcel added in v0.0.4

func (m *Account) WriteToParcel(arg0 *jni.Object, arg1 int32) error

WriteToParcel calls android.accounts.Account.writeToParcel.

type AccountManager added in v0.0.4

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

AccountManager wraps android.accounts.AccountManager.

func NewAccountManager added in v0.0.4

func NewAccountManager(ctx *app.Context) (*AccountManager, error)

NewAccountManager obtains android.accounts.AccountManager from the Android system service manager.

func (*AccountManager) AddAccountExplicitly3 added in v0.0.4

func (m *AccountManager) AddAccountExplicitly3(
	arg0 *jni.Object,
	arg1 string,
	arg2 *jni.Object,
) (bool, error)

AddAccountExplicitly3 calls android.accounts.AccountManager.addAccountExplicitly.

func (*AccountManager) AddAccountExplicitly4_1 added in v0.0.4

func (m *AccountManager) AddAccountExplicitly4_1(
	arg0 *jni.Object,
	arg1 string,
	arg2 *jni.Object,
	arg3 *jni.Object,
) (bool, error)

AddAccountExplicitly4_1 calls android.accounts.AccountManager.addAccountExplicitly.

func (*AccountManager) BlockingGetAuthToken added in v0.0.4

func (m *AccountManager) BlockingGetAuthToken(
	arg0 *jni.Object,
	arg1 string,
	arg2 bool,
) (string, error)

BlockingGetAuthToken calls android.accounts.AccountManager.blockingGetAuthToken.

func (*AccountManager) ClearPassword added in v0.0.4

func (m *AccountManager) ClearPassword(arg0 *jni.Object) error

ClearPassword calls android.accounts.AccountManager.clearPassword.

func (*AccountManager) Close added in v0.0.4

func (m *AccountManager) Close()

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

func (*AccountManager) Get added in v0.0.4

func (m *AccountManager) Get(arg0 *jni.Object) (*jni.Object, error)

Get calls android.accounts.AccountManager.get.

func (*AccountManager) GetAccountVisibility added in v0.0.4

func (m *AccountManager) GetAccountVisibility(arg0 *jni.Object, arg1 string) (int32, error)

GetAccountVisibility calls android.accounts.AccountManager.getAccountVisibility.

func (*AccountManager) GetAccounts added in v0.0.4

func (m *AccountManager) GetAccounts() (*jni.Object, error)

GetAccounts calls android.accounts.AccountManager.getAccounts.

func (*AccountManager) GetAccountsByType added in v0.0.4

func (m *AccountManager) GetAccountsByType(arg0 string) (*jni.Object, error)

GetAccountsByType calls android.accounts.AccountManager.getAccountsByType.

func (*AccountManager) GetAccountsByTypeForPackage added in v0.0.4

func (m *AccountManager) GetAccountsByTypeForPackage(arg0 string, arg1 string) (*jni.Object, error)

GetAccountsByTypeForPackage calls android.accounts.AccountManager.getAccountsByTypeForPackage.

func (*AccountManager) GetAuthenticatorTypes added in v0.0.4

func (m *AccountManager) GetAuthenticatorTypes() (*jni.Object, error)

GetAuthenticatorTypes calls android.accounts.AccountManager.getAuthenticatorTypes.

func (*AccountManager) GetPassword added in v0.0.4

func (m *AccountManager) GetPassword(arg0 *jni.Object) (string, error)

GetPassword calls android.accounts.AccountManager.getPassword.

func (*AccountManager) GetPreviousName added in v0.0.4

func (m *AccountManager) GetPreviousName(arg0 *jni.Object) (string, error)

GetPreviousName calls android.accounts.AccountManager.getPreviousName.

func (*AccountManager) GetUserData added in v0.0.4

func (m *AccountManager) GetUserData(arg0 *jni.Object, arg1 string) (string, error)

GetUserData calls android.accounts.AccountManager.getUserData.

func (*AccountManager) InvalidateAuthToken added in v0.0.4

func (m *AccountManager) InvalidateAuthToken(arg0 string, arg1 string) error

InvalidateAuthToken calls android.accounts.AccountManager.invalidateAuthToken.

func (*AccountManager) NewChooseAccountIntent7_1 added in v0.0.4

func (m *AccountManager) NewChooseAccountIntent7_1(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
	arg3 string,
	arg4 string,
	arg5 *jni.Object,
	arg6 *jni.Object,
) (*jni.Object, error)

NewChooseAccountIntent7_1 calls android.accounts.AccountManager.newChooseAccountIntent.

func (*AccountManager) NewChooseAccountIntent8 added in v0.0.4

func (m *AccountManager) NewChooseAccountIntent8(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
	arg3 bool,
	arg4 string,
	arg5 string,
	arg6 *jni.Object,
	arg7 *jni.Object,
) (*jni.Object, error)

NewChooseAccountIntent8 calls android.accounts.AccountManager.newChooseAccountIntent.

func (*AccountManager) NotifyAccountAuthenticated added in v0.0.4

func (m *AccountManager) NotifyAccountAuthenticated(arg0 *jni.Object) (bool, error)

NotifyAccountAuthenticated calls android.accounts.AccountManager.notifyAccountAuthenticated.

func (*AccountManager) PeekAuthToken added in v0.0.4

func (m *AccountManager) PeekAuthToken(arg0 *jni.Object, arg1 string) (string, error)

PeekAuthToken calls android.accounts.AccountManager.peekAuthToken.

func (*AccountManager) RemoveAccountExplicitly added in v0.0.4

func (m *AccountManager) RemoveAccountExplicitly(arg0 *jni.Object) (bool, error)

RemoveAccountExplicitly calls android.accounts.AccountManager.removeAccountExplicitly.

func (*AccountManager) RemoveOnAccountsUpdatedListener added in v0.0.4

func (m *AccountManager) RemoveOnAccountsUpdatedListener(arg0 *jni.Object) error

RemoveOnAccountsUpdatedListener calls android.accounts.AccountManager.removeOnAccountsUpdatedListener.

func (*AccountManager) SetAccountVisibility added in v0.0.4

func (m *AccountManager) SetAccountVisibility(
	arg0 *jni.Object,
	arg1 string,
	arg2 int32,
) (bool, error)

SetAccountVisibility calls android.accounts.AccountManager.setAccountVisibility.

func (*AccountManager) SetAuthToken added in v0.0.4

func (m *AccountManager) SetAuthToken(
	arg0 *jni.Object,
	arg1 string,
	arg2 string,
) error

SetAuthToken calls android.accounts.AccountManager.setAuthToken.

func (*AccountManager) SetPassword added in v0.0.4

func (m *AccountManager) SetPassword(arg0 *jni.Object, arg1 string) error

SetPassword calls android.accounts.AccountManager.setPassword.

func (*AccountManager) SetUserData added in v0.0.4

func (m *AccountManager) SetUserData(
	arg0 *jni.Object,
	arg1 string,
	arg2 string,
) error

SetUserData calls android.accounts.AccountManager.setUserData.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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