android-components / mozilla.components.feature.pwa / WebAppUseCases

WebAppUseCases

class WebAppUseCases (source)

These use cases allow for adding a web app or web site to the homescreen.

Types

Name Summary
AddToHomescreenUseCase class AddToHomescreenUseCase
Let the user add the selected session to the homescreen.
GetInstallStateUseCase class GetInstallStateUseCase
Checks the current install state of a Web App.

Constructors

Name Summary
<init> WebAppUseCases(applicationContext: <ERROR CLASS>, sessionManager: SessionManager, httpClient: Client, supportWebApps: Boolean = true)WebAppUseCases(applicationContext: <ERROR CLASS>, sessionManager: SessionManager, shortcutManager: WebAppShortcutManager)
These use cases allow for adding a web app or web site to the homescreen.

Properties

Name Summary
addToHomescreen val addToHomescreen: AddToHomescreenUseCase
getInstallState val getInstallState: GetInstallStateUseCase

Functions

Name Summary
isInstallable fun isInstallable(): Boolean
Checks to see if the current session can be installed as a Progressive Web App.
isPinningSupported fun isPinningSupported(): Boolean
Checks if the launcher supports adding shortcuts.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.