@Retention(value=RUNTIME) @Target(value=TYPE) public @interface PWA
Only one annotation for application is supported. Annotation must be placed to master layout. Application annotated the annotation will add following capabilities to Flow application:
Modifier and Type | Required Element and Description |
---|---|
String |
name
Name of the application.
|
String |
shortName
Short name for the application.
|
Modifier and Type | Optional Element and Description |
---|---|
String |
backgroundColor
Background color of the application.
|
String |
description
Description of the application.
|
String |
display
Defines the developers’ preferred display mode for the website.
|
boolean |
enableInstallPrompt
If enabled, server will inject default pwa -install prompt html and js
in bootstrap page.
|
String |
iconPath
Path to the application icon file.
|
String |
manifestPath
Path to the manifest file.
|
String |
offlinePath
Path to the static offline html file.
|
String[] |
offlineResources
Offline resources to be cached using the service worker.
|
String |
startPath
(Root relative) start url, used in web-manifest, property start_url
|
String |
themeColor
Theme color of the application.
|
public abstract String name
public abstract String shortName
public abstract String offlinePath
public abstract String manifestPath
public abstract String iconPath
Defaults to (relative) icons/icon.png with default configuration that is webapp/manifest.webmanifest
If the specified icon file is not found, the default one will be used. The file is also used to create different sizes of icon.
public abstract String startPath
Used in manifest as start_url of application. Must be relative to root context. ie. If install address of application would be https://foo.bar.org/sub/ and wanted start url would be https://foo.bar.org/sub/pwa-start then value of startPath would be "pwa-start" (without leading "/").
Defaults to root of application.
public abstract String description
public abstract String themeColor
public abstract String backgroundColor
public abstract String display
public abstract String[] offlineResources
public abstract boolean enableInstallPrompt
Will capture beforeinstallprompt -event and show install prompt as required from Chrome 68 upwards.
Copyright © 2023. All rights reserved.