sebawagner commented on a change in pull request #164:
URL: https://github.com/apache/openmeetings/pull/164#discussion_r730472451
##########
File path:
openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java
##########
@@ -91,4 +98,38 @@ public Info getVersion() {
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);
Review comment:
For now it's only maskable. But there can be other values in the future.
It can be "any" or "maskable" or both, see also:
https://web.dev/maskable-icon-audit/
We may require other values in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]