accounts

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Overview

Package accounts provides Go bindings for android.accounts.

Index

Constants

View Source
const (
	Creator                         = consts.Creator
	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
)
View Source
const (
	KeyCustomTokenExpiry            = consts.KeyCustomTokenExpiry
	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
)

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 AbstractAccountAuthenticator added in v0.0.7

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

AbstractAccountAuthenticator wraps android.accounts.AbstractAccountAuthenticator.

func (*AbstractAccountAuthenticator) AddAccount added in v0.0.7

func (m *AbstractAccountAuthenticator) AddAccount(
	arg0 *jni.Object,
	arg1 string,
	arg2 string,
	arg3 *jni.Object,
	arg4 *jni.Object,
) (*jni.Object, error)

AddAccount calls android.accounts.AbstractAccountAuthenticator.addAccount.

func (*AbstractAccountAuthenticator) AddAccountFromCredentials added in v0.0.7

func (m *AbstractAccountAuthenticator) AddAccountFromCredentials(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
) (*jni.Object, error)

AddAccountFromCredentials calls android.accounts.AbstractAccountAuthenticator.addAccountFromCredentials.

func (*AbstractAccountAuthenticator) ConfirmCredentials added in v0.0.7

func (m *AbstractAccountAuthenticator) ConfirmCredentials(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
) (*jni.Object, error)

ConfirmCredentials calls android.accounts.AbstractAccountAuthenticator.confirmCredentials.

func (*AbstractAccountAuthenticator) EditProperties added in v0.0.7

func (m *AbstractAccountAuthenticator) EditProperties(arg0 *jni.Object, arg1 string) (*jni.Object, error)

EditProperties calls android.accounts.AbstractAccountAuthenticator.editProperties.

func (*AbstractAccountAuthenticator) FinishSession added in v0.0.7

func (m *AbstractAccountAuthenticator) FinishSession(
	arg0 *jni.Object,
	arg1 string,
	arg2 *jni.Object,
) (*jni.Object, error)

FinishSession calls android.accounts.AbstractAccountAuthenticator.finishSession.

func (*AbstractAccountAuthenticator) GetAccountCredentialsForCloning added in v0.0.7

func (m *AbstractAccountAuthenticator) GetAccountCredentialsForCloning(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

GetAccountCredentialsForCloning calls android.accounts.AbstractAccountAuthenticator.getAccountCredentialsForCloning.

func (*AbstractAccountAuthenticator) GetAccountRemovalAllowed added in v0.0.7

func (m *AbstractAccountAuthenticator) GetAccountRemovalAllowed(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

GetAccountRemovalAllowed calls android.accounts.AbstractAccountAuthenticator.getAccountRemovalAllowed.

func (*AbstractAccountAuthenticator) GetAuthToken added in v0.0.7

func (m *AbstractAccountAuthenticator) GetAuthToken(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 string,
	arg3 *jni.Object,
) (*jni.Object, error)

GetAuthToken calls android.accounts.AbstractAccountAuthenticator.getAuthToken.

func (*AbstractAccountAuthenticator) GetAuthTokenLabel added in v0.0.7

func (m *AbstractAccountAuthenticator) GetAuthTokenLabel(arg0 string) (string, error)

GetAuthTokenLabel calls android.accounts.AbstractAccountAuthenticator.getAuthTokenLabel.

func (*AbstractAccountAuthenticator) GetIBinder added in v0.0.7

func (m *AbstractAccountAuthenticator) GetIBinder() (*jni.Object, error)

GetIBinder calls android.accounts.AbstractAccountAuthenticator.getIBinder.

func (*AbstractAccountAuthenticator) HasFeatures added in v0.0.7

func (m *AbstractAccountAuthenticator) HasFeatures(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
) (*jni.Object, error)

HasFeatures calls android.accounts.AbstractAccountAuthenticator.hasFeatures.

func (*AbstractAccountAuthenticator) IsCredentialsUpdateSuggested added in v0.0.7

func (m *AbstractAccountAuthenticator) IsCredentialsUpdateSuggested(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 string,
) (*jni.Object, error)

IsCredentialsUpdateSuggested calls android.accounts.AbstractAccountAuthenticator.isCredentialsUpdateSuggested.

func (*AbstractAccountAuthenticator) StartAddAccountSession added in v0.0.7

func (m *AbstractAccountAuthenticator) StartAddAccountSession(
	arg0 *jni.Object,
	arg1 string,
	arg2 string,
	arg3 *jni.Object,
	arg4 *jni.Object,
) (*jni.Object, error)

StartAddAccountSession calls android.accounts.AbstractAccountAuthenticator.startAddAccountSession.

func (*AbstractAccountAuthenticator) StartUpdateCredentialsSession added in v0.0.7

func (m *AbstractAccountAuthenticator) StartUpdateCredentialsSession(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 string,
	arg3 *jni.Object,
) (*jni.Object, error)

StartUpdateCredentialsSession calls android.accounts.AbstractAccountAuthenticator.startUpdateCredentialsSession.

func (*AbstractAccountAuthenticator) UpdateCredentials added in v0.0.7

func (m *AbstractAccountAuthenticator) UpdateCredentials(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 string,
	arg3 *jni.Object,
) (*jni.Object, error)

UpdateCredentials calls android.accounts.AbstractAccountAuthenticator.updateCredentials.

type Account added in v0.0.4

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

Account wraps android.accounts.Account.

func NewAccount added in v0.0.7

func NewAccount(vm *jni.VM, arg0 *jni.Object) (*Account, error)

NewAccount creates a new android.accounts.Account instance.

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 AccountAuthenticatorActivity added in v0.0.7

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

AccountAuthenticatorActivity wraps android.accounts.AccountAuthenticatorActivity.

func NewAccountAuthenticatorActivity added in v0.0.7

func NewAccountAuthenticatorActivity(vm *jni.VM) (*AccountAuthenticatorActivity, error)

NewAccountAuthenticatorActivity creates a new android.accounts.AccountAuthenticatorActivity instance.

func (*AccountAuthenticatorActivity) Finish added in v0.0.7

func (m *AccountAuthenticatorActivity) Finish() error

Finish calls android.accounts.AccountAuthenticatorActivity.finish.

func (*AccountAuthenticatorActivity) SetAccountAuthenticatorResult added in v0.0.7

func (m *AccountAuthenticatorActivity) SetAccountAuthenticatorResult(arg0 *jni.Object) error

SetAccountAuthenticatorResult calls android.accounts.AccountAuthenticatorActivity.setAccountAuthenticatorResult.

type AccountAuthenticatorResponse added in v0.0.7

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

AccountAuthenticatorResponse wraps android.accounts.AccountAuthenticatorResponse.

func NewAccountAuthenticatorResponse added in v0.0.7

func NewAccountAuthenticatorResponse(vm *jni.VM, arg0 *jni.Object) (*AccountAuthenticatorResponse, error)

NewAccountAuthenticatorResponse creates a new android.accounts.AccountAuthenticatorResponse instance.

func (*AccountAuthenticatorResponse) DescribeContents added in v0.0.7

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

DescribeContents calls android.accounts.AccountAuthenticatorResponse.describeContents.

func (*AccountAuthenticatorResponse) OnError added in v0.0.7

func (m *AccountAuthenticatorResponse) OnError(arg0 int32, arg1 string) error

OnError calls android.accounts.AccountAuthenticatorResponse.onError.

func (*AccountAuthenticatorResponse) OnRequestContinued added in v0.0.7

func (m *AccountAuthenticatorResponse) OnRequestContinued() error

OnRequestContinued calls android.accounts.AccountAuthenticatorResponse.onRequestContinued.

func (*AccountAuthenticatorResponse) OnResult added in v0.0.7

func (m *AccountAuthenticatorResponse) OnResult(arg0 *jni.Object) error

OnResult calls android.accounts.AccountAuthenticatorResponse.onResult.

func (*AccountAuthenticatorResponse) WriteToParcel added in v0.0.7

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

WriteToParcel calls android.accounts.AccountAuthenticatorResponse.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) AddAccountExplicitly added in v0.0.7

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

AddAccountExplicitly 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) 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.

type AccountManagerFuture added in v0.0.7

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

AccountManagerFuture wraps android.accounts.AccountManagerFuture.

func (*AccountManagerFuture) Cancel added in v0.0.7

func (m *AccountManagerFuture) Cancel(arg0 bool) (bool, error)

Cancel calls android.accounts.AccountManagerFuture.cancel.

func (*AccountManagerFuture) IsCancelled added in v0.0.7

func (m *AccountManagerFuture) IsCancelled() (bool, error)

IsCancelled calls android.accounts.AccountManagerFuture.isCancelled.

func (*AccountManagerFuture) IsDone added in v0.0.7

func (m *AccountManagerFuture) IsDone() (bool, error)

IsDone calls android.accounts.AccountManagerFuture.isDone.

type AuthenticatorDescription added in v0.0.7

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

AuthenticatorDescription wraps android.accounts.AuthenticatorDescription.

func NewAuthenticatorDescription added in v0.0.7

func NewAuthenticatorDescription(vm *jni.VM, arg0 string, arg1 string, arg2 int32, arg3 int32, arg4 int32, arg5 int32) (*AuthenticatorDescription, error)

NewAuthenticatorDescription creates a new android.accounts.AuthenticatorDescription instance.

func (*AuthenticatorDescription) DescribeContents added in v0.0.7

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

DescribeContents calls android.accounts.AuthenticatorDescription.describeContents.

func (*AuthenticatorDescription) Equals added in v0.0.7

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

Equals calls android.accounts.AuthenticatorDescription.equals.

func (*AuthenticatorDescription) HashCode added in v0.0.7

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

HashCode calls android.accounts.AuthenticatorDescription.hashCode.

func (*AuthenticatorDescription) NewKey added in v0.0.7

func (m *AuthenticatorDescription) NewKey(arg0 string) (*jni.Object, error)

NewKey calls android.accounts.AuthenticatorDescription.newKey.

func (*AuthenticatorDescription) ToString added in v0.0.7

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

ToString calls android.accounts.AuthenticatorDescription.toString.

func (*AuthenticatorDescription) WriteToParcel added in v0.0.7

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

WriteToParcel calls android.accounts.AuthenticatorDescription.writeToParcel.

type AuthenticatorException added in v0.0.7

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

AuthenticatorException wraps android.accounts.AuthenticatorException.

func NewAuthenticatorException added in v0.0.7

func NewAuthenticatorException(vm *jni.VM) (*AuthenticatorException, error)

NewAuthenticatorException creates a new android.accounts.AuthenticatorException instance.

type Exception added in v0.0.7

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

Exception wraps android.accounts.AccountsException.

func NewException added in v0.0.7

func NewException(vm *jni.VM) (*Exception, error)

NewException creates a new android.accounts.AccountsException instance.

type NetworkErrorException added in v0.0.7

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

NetworkErrorException wraps android.accounts.NetworkErrorException.

func NewNetworkErrorException added in v0.0.7

func NewNetworkErrorException(vm *jni.VM) (*NetworkErrorException, error)

NewNetworkErrorException creates a new android.accounts.NetworkErrorException instance.

type OnAccountsUpdateListener added in v0.0.7

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

OnAccountsUpdateListener wraps android.accounts.OnAccountsUpdateListener.

func (*OnAccountsUpdateListener) OnAccountsUpdated added in v0.0.7

func (m *OnAccountsUpdateListener) OnAccountsUpdated(arg0 *jni.Object) error

OnAccountsUpdated calls android.accounts.OnAccountsUpdateListener.onAccountsUpdated.

type OperationCanceledException added in v0.0.7

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

OperationCanceledException wraps android.accounts.OperationCanceledException.

func NewOperationCanceledException added in v0.0.7

func NewOperationCanceledException(vm *jni.VM) (*OperationCanceledException, error)

NewOperationCanceledException creates a new android.accounts.OperationCanceledException instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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