This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a commit to branch 
feature/OPENMEETINGS-2683-manifest-file-for-saving-to-home-screen
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 8f94d1d73d1b6a36d1996a6bbae0743632b9125f
Author: Sebastian Wagner <seba.wag...@gmail.com>
AuthorDate: Sun Oct 17 12:45:39 2021 +1300

    OPENMEETINGS-2683 Add manifest file for adding icon, splash screen and 
browser settings for when adding to home screen on mobile.
---
 .../apache/openmeetings/web/pages/BasePage.html    |  29 +++++++++++++++
 .../main/webapp/images/icons/apple-icon-180.png    | Bin 0 -> 10696 bytes
 .../webapp/images/icons/apple-splash-1125-2436.jpg | Bin 0 -> 66463 bytes
 .../webapp/images/icons/apple-splash-1136-640.jpg  | Bin 0 -> 24945 bytes
 .../webapp/images/icons/apple-splash-1170-2532.jpg | Bin 0 -> 69906 bytes
 .../webapp/images/icons/apple-splash-1242-2208.jpg | Bin 0 -> 72120 bytes
 .../webapp/images/icons/apple-splash-1242-2688.jpg | Bin 0 -> 75659 bytes
 .../webapp/images/icons/apple-splash-1284-2778.jpg | Bin 0 -> 78823 bytes
 .../webapp/images/icons/apple-splash-1334-750.jpg  | Bin 0 -> 31010 bytes
 .../webapp/images/icons/apple-splash-1536-2048.jpg | Bin 0 -> 88952 bytes
 .../webapp/images/icons/apple-splash-1620-2160.jpg | Bin 0 -> 95661 bytes
 .../webapp/images/icons/apple-splash-1668-2224.jpg | Bin 0 -> 99240 bytes
 .../webapp/images/icons/apple-splash-1668-2388.jpg | Bin 0 -> 101273 bytes
 .../webapp/images/icons/apple-splash-1792-828.jpg  | Bin 0 -> 32864 bytes
 .../webapp/images/icons/apple-splash-2048-1536.jpg | Bin 0 -> 83104 bytes
 .../webapp/images/icons/apple-splash-2048-2732.jpg | Bin 0 -> 130068 bytes
 .../webapp/images/icons/apple-splash-2160-1620.jpg | Bin 0 -> 89441 bytes
 .../webapp/images/icons/apple-splash-2208-1242.jpg | Bin 0 -> 60178 bytes
 .../webapp/images/icons/apple-splash-2224-1668.jpg | Bin 0 -> 92538 bytes
 .../webapp/images/icons/apple-splash-2388-1668.jpg | Bin 0 -> 92578 bytes
 .../webapp/images/icons/apple-splash-2436-1125.jpg | Bin 0 -> 50367 bytes
 .../webapp/images/icons/apple-splash-2532-1170.jpg | Bin 0 -> 53274 bytes
 .../webapp/images/icons/apple-splash-2688-1242.jpg | Bin 0 -> 57573 bytes
 .../webapp/images/icons/apple-splash-2732-2048.jpg | Bin 0 -> 121595 bytes
 .../webapp/images/icons/apple-splash-2778-1284.jpg | Bin 0 -> 60820 bytes
 .../webapp/images/icons/apple-splash-640-1136.jpg  | Bin 0 -> 30165 bytes
 .../webapp/images/icons/apple-splash-750-1334.jpg  | Bin 0 -> 37214 bytes
 .../webapp/images/icons/apple-splash-828-1792.jpg  | Bin 0 -> 44404 bytes
 .../images/icons/manifest-icon-192.maskable.png    | Bin 0 -> 11489 bytes
 .../images/icons/manifest-icon-512.maskable.png    | Bin 0 -> 40763 bytes
 .../openmeetings/webservice/InfoWebService.java    |  41 +++++++++++++++++++++
 31 files changed, 70 insertions(+)

diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
index 72b547a..2220592 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
@@ -23,6 +23,35 @@
 <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <meta name="viewport" content="height=device-height, initial-scale=1, 
width=device-width, initial-scale=1" />
+       <link rel="apple-touch-icon" href="images/icons/apple-icon-180.png">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2048-2732.jpg" media="(device-width: 1024px) 
and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and 
(orientation: portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2732-2048.jpg" media="(device-width: 1024px) 
and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and 
(orientation: landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1668-2388.jpg" media="(device-width: 834px) and 
(device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2388-1668.jpg" media="(device-width: 834px) and 
(device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1536-2048.jpg" media="(device-width: 768px) and 
(device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2048-1536.jpg" media="(device-width: 768px) and 
(device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1668-2224.jpg" media="(device-width: 834px) and 
(device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2224-1668.jpg" media="(device-width: 834px) and 
(device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1620-2160.jpg" media="(device-width: 810px) and 
(device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2160-1620.jpg" media="(device-width: 810px) and 
(device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1284-2778.jpg" media="(device-width: 428px) and 
(device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2778-1284.jpg" media="(device-width: 428px) and 
(device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1170-2532.jpg" media="(device-width: 390px) and 
(device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2532-1170.jpg" media="(device-width: 390px) and 
(device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1125-2436.jpg" media="(device-width: 375px) and 
(device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2436-1125.jpg" media="(device-width: 375px) and 
(device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1242-2688.jpg" media="(device-width: 414px) and 
(device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2688-1242.jpg" media="(device-width: 414px) and 
(device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-828-1792.jpg" media="(device-width: 414px) and 
(device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1792-828.jpg" media="(device-width: 414px) and 
(device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1242-2208.jpg" media="(device-width: 414px) and 
(device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-2208-1242.jpg" media="(device-width: 414px) and 
(device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-750-1334.jpg" media="(device-width: 375px) and 
(device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1334-750.jpg" media="(device-width: 375px) and 
(device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-640-1136.jpg" media="(device-width: 320px) and 
(device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
portrait)">
+    <link rel="apple-touch-startup-image" 
href="images/icons/apple-splash-1136-640.jpg" media="(device-width: 320px) and 
(device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: 
landscape)">
+       <link rel="manifest" href="services/info/manifest.webmanifest">
        <link rel="shortcut icon" href="public/favicon.png" type="image/png"/>
        <wicket:header-items/>
        <title wicket:id="pageTitle">[title]</title>
diff --git a/openmeetings-web/src/main/webapp/images/icons/apple-icon-180.png 
b/openmeetings-web/src/main/webapp/images/icons/apple-icon-180.png
new file mode 100644
index 0000000..eb4a41d
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-icon-180.png differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1125-2436.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1125-2436.jpg
new file mode 100644
index 0000000..d5e6945
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1125-2436.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1136-640.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1136-640.jpg
new file mode 100644
index 0000000..495ce3a
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1136-640.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1170-2532.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1170-2532.jpg
new file mode 100644
index 0000000..ebbb7d0
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1170-2532.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2208.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2208.jpg
new file mode 100644
index 0000000..41d90f6
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2208.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2688.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2688.jpg
new file mode 100644
index 0000000..e700992
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1242-2688.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1284-2778.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1284-2778.jpg
new file mode 100644
index 0000000..00dc1f5
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1284-2778.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1334-750.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1334-750.jpg
new file mode 100644
index 0000000..df9b66a
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1334-750.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1536-2048.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1536-2048.jpg
new file mode 100644
index 0000000..0cc0149
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1536-2048.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1620-2160.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1620-2160.jpg
new file mode 100644
index 0000000..72d65dc
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1620-2160.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2224.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2224.jpg
new file mode 100644
index 0000000..be91316
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2224.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2388.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2388.jpg
new file mode 100644
index 0000000..261d074
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1668-2388.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-1792-828.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1792-828.jpg
new file mode 100644
index 0000000..4ac9f32
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-1792-828.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-1536.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-1536.jpg
new file mode 100644
index 0000000..c3e1604
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-1536.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-2732.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-2732.jpg
new file mode 100644
index 0000000..e148bca
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2048-2732.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2160-1620.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2160-1620.jpg
new file mode 100644
index 0000000..611f94a
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2160-1620.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2208-1242.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2208-1242.jpg
new file mode 100644
index 0000000..513dd62
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2208-1242.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2224-1668.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2224-1668.jpg
new file mode 100644
index 0000000..36e613c
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2224-1668.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2388-1668.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2388-1668.jpg
new file mode 100644
index 0000000..a5ef07c
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2388-1668.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2436-1125.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2436-1125.jpg
new file mode 100644
index 0000000..961316c
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2436-1125.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2532-1170.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2532-1170.jpg
new file mode 100644
index 0000000..76c6110
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2532-1170.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2688-1242.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2688-1242.jpg
new file mode 100644
index 0000000..a42c036
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2688-1242.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2732-2048.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2732-2048.jpg
new file mode 100644
index 0000000..a55c6b2
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2732-2048.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-2778-1284.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2778-1284.jpg
new file mode 100644
index 0000000..2ea3f46
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-2778-1284.jpg 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-640-1136.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-640-1136.jpg
new file mode 100644
index 0000000..eee3d9b
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-640-1136.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-750-1334.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-750-1334.jpg
new file mode 100644
index 0000000..f76bb54
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-750-1334.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/apple-splash-828-1792.jpg 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-828-1792.jpg
new file mode 100644
index 0000000..05c8946
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/apple-splash-828-1792.jpg differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/manifest-icon-192.maskable.png 
b/openmeetings-web/src/main/webapp/images/icons/manifest-icon-192.maskable.png
new file mode 100644
index 0000000..8948225
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/manifest-icon-192.maskable.png 
differ
diff --git 
a/openmeetings-web/src/main/webapp/images/icons/manifest-icon-512.maskable.png 
b/openmeetings-web/src/main/webapp/images/icons/manifest-icon-512.maskable.png
new file mode 100644
index 0000000..ac55c94
Binary files /dev/null and 
b/openmeetings-web/src/main/webapp/images/icons/manifest-icon-512.maskable.png 
differ
diff --git 
a/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
 
b/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
index 95e5552..a80fbdf 100644
--- 
a/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
+++ 
b/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
@@ -20,6 +20,8 @@ package org.apache.openmeetings.webservice;
 
 import static org.apache.openmeetings.webservice.Constants.TNS;
 
+import java.util.Locale;
+
 import javax.jws.WebMethod;
 import javax.jws.WebService;
 import javax.ws.rs.GET;
@@ -30,10 +32,15 @@ import javax.ws.rs.core.MediaType;
 import org.apache.cxf.feature.Features;
 import org.apache.openmeetings.db.dto.basic.Health;
 import org.apache.openmeetings.db.dto.basic.Info;
+import org.apache.openmeetings.util.OpenmeetingsVariables;
+import org.apache.openmeetings.util.Version;
 import org.apache.openmeetings.webservice.schema.HealthWrapper;
 import org.apache.openmeetings.webservice.schema.InfoWrapper;
 import org.springframework.stereotype.Service;
 
+import com.github.openjson.JSONArray;
+import com.github.openjson.JSONObject;
+
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -91,4 +98,38 @@ public class InfoWebService {
        public Health getHealth() {
                return Health.INSTANCE;
        }
+
+       @WebMethod
+       @GET
+       @Path("/manifest.webmanifest")
+       @Produces({"application/manifest+json"})
+       public String getManifest() {
+               JSONObject manifest = new JSONObject();
+               manifest.put("name", OpenmeetingsVariables.getApplicationName() 
+ " " + Version.getVersion());
+               manifest.put("short_name", 
OpenmeetingsVariables.getApplicationName() + " " + Version.getVersion());
+               manifest.put("description", "Openmeetings provides video 
conferencing, instant messaging, white board, collaborative document editing 
and other groupware tools.");
+               manifest.put("start_url", "/" + 
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) + 
"/?pwa=true");
+               manifest.put("scope", "/");
+               manifest.put("background_color", "#ffffff");
+               manifest.put("theme_color", "#ffffff");
+               manifest.put("dir", "auto");
+               manifest.put("display", "standalone");
+               manifest.put("orientation", "landscape");
+               JSONArray icons = new JSONArray();
+               icons.put(generateIcon("manifest-icon-512.maskable.png", 
"512x512", "maskable"));
+               icons.put(generateIcon("manifest-icon-192.maskable.png", 
"192x192", "maskable"));
+               manifest.put("icons", icons);
+               manifest.put("prefer_related_applications", "false");
+               return manifest.toString(2);
+       }
+
+       private JSONObject generateIcon(String name, String dimension, String 
purpose) {
+               JSONObject icon = new JSONObject();
+               icon.put("src", "/" + 
OpenmeetingsVariables.getApplicationName().toLowerCase(Locale.getDefault()) + 
"/images/icons/" + name);
+               icon.put("type", "image/png");
+               icon.put("sizes", dimension);
+               icon.put("purpose", purpose);
+               return icon;
+       }
+
 }

Reply via email to