AppsManager service
#
Instanciating the serviceLoad the following scripts:
You can then get an instance of the service with code similar to:
Then the developer can use _appsManager as AppsManager service instance.
This service implements the AppsEngine interface.
#
AppsInstallState enumeration#
AppsServiceError enumeration#
AppsServiceState enumeration#
AppsStatus enumeration#
AppsUpdateState enumeration#
ClearType enumeration#
ConnectionType enumeration#
TokenType enumeration#
AppsObject dictionnary#
AppsOptions dictionnary#
DownloadFailedReason dictionnary#
Token dictionnary#
UpdatePolicy dictionnary#
TokenProvider callback object#
Creating a TokenProvider objectUse code similar to:
#
Methods// tokenType: TokenType
getToken(tokenType)
Resolves with Token
Rejects with void
#
AppsEngine Interface#
Methods  cancelDownload checkForUpdate clear getAll getApp getState getUpdatePolicy installPackage installPwa setEnabled setTokenProvider setUpdatePolicy uninstall update verify
// updateUrl: string
cancelDownload(updateUrl)
Resolves with AppsObject
Rejects with AppsServiceError
// updateUrl: string
// appsOption: AppsOptions
checkForUpdate(updateUrl, appsOption)
Resolves with boolean
Rejects with AppsServiceError
// manifestUrl: string
// dataType: ClearType
clear(manifestUrl, dataType)
Resolves with boolean
Rejects with AppsServiceError
getAll()
Resolves with [AppsObject]?
Rejects with AppsServiceError
// manifestUrl: string
getApp(manifestUrl)
Resolves with AppsObject
Rejects with AppsServiceError
getState()
Resolves with AppsServiceState
Rejects with void
getUpdatePolicy()
Resolves with UpdatePolicy
Rejects with void
// updateUrl: string
installPackage(updateUrl)
Resolves with AppsObject
Rejects with AppsServiceError
// manifestUrl: string
installPwa(manifestUrl)
Resolves with AppsObject
Rejects with AppsServiceError
// manifestUrl: string
// status: AppsStatus
setEnabled(manifestUrl, status)
Resolves with AppsObject
Rejects with AppsServiceError
// provider: TokenProvider
setTokenProvider(provider)
Resolves with void
Rejects with void
// config: UpdatePolicy
setUpdatePolicy(config)
Resolves with boolean
Rejects with void
// manifestUrl: string
uninstall(manifestUrl)
Resolves with string
Rejects with AppsServiceError
// manifestUrl: string
update(manifestUrl)
Resolves with AppsObject
Rejects with AppsServiceError
// manifestUrl: string
// certType: string
// folderName: string
verify(manifestUrl, certType, folderName)
Resolves with string
Rejects with AppsServiceError
#
Events  APP_DOWNLOAD_FAILED APP_INSTALLED APP_INSTALLING APP_UNINSTALLED APP_UPDATE_AVAILABLE APP_UPDATED APP_UPDATING APPSTATUS_CHANGED
The APP_DOWNLOAD_FAILED event emits a DownloadFailedReason
To manage this event, use code similar to:
The APP_INSTALLED event emits a AppsObject
To manage this event, use code similar to:
The APP_INSTALLING event emits a AppsObject
To manage this event, use code similar to:
The APP_UNINSTALLED event emits a string
To manage this event, use code similar to:
The APP_UPDATE_AVAILABLE event emits a AppsObject
To manage this event, use code similar to:
The APP_UPDATED event emits a AppsObject
To manage this event, use code similar to:
The APP_UPDATING event emits a AppsObject
To manage this event, use code similar to:
The APPSTATUS_CHANGED event emits a AppsObject
To manage this event, use code similar to: