diff --git a/motorradig/public/badge-96x96.png b/motorradig/public/badge-96x96.png new file mode 100644 index 0000000..0c38576 Binary files /dev/null and b/motorradig/public/badge-96x96.png differ diff --git a/motorradig/public/manifest.webmanifest b/motorradig/public/manifest.webmanifest index 041cfca..03f3136 100644 --- a/motorradig/public/manifest.webmanifest +++ b/motorradig/public/manifest.webmanifest @@ -31,6 +31,12 @@ "sizes": "512x512", "type": "image/png", "purpose": "maskable" + }, + { + "src": "/badge-96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "monochrome" } ], "shortcuts": [ diff --git a/motorradig/public/sw.js b/motorradig/public/sw.js index d4586db..8eef32d 100644 --- a/motorradig/public/sw.js +++ b/motorradig/public/sw.js @@ -10,12 +10,13 @@ */ 'use strict'; -var CACHE_VERSION = 'motorradig-static-v4'; +var CACHE_VERSION = 'motorradig-static-v5'; var OFFLINE_URL = '/offline.html'; var PRECACHE_URLS = [ OFFLINE_URL, '/manifest.webmanifest', + '/badge-96x96.png', '/pwa-192x192.png', '/pwa-512x512.png', '/pwa-maskable-512x512.png', @@ -182,7 +183,10 @@ self.addEventListener('push', function (event) { var options = { body: data.body || '', icon: '/pwa-192x192.png', - badge: '/pwa-192x192.png', + // Statusleisten-Icon (Android): muss eine einfarbige Silhouette mit + // transparentem Hintergrund sein. Ein farbiges/opakes Icon wird von + // Android als weißes Quadrat dargestellt. + badge: '/badge-96x96.png', tag: data.tag || undefined, data: { url: data.url || '/' } };