diff --git a/index.html b/index.html index e90cff1..a62a3b7 100644 --- a/index.html +++ b/index.html @@ -5406,11 +5406,15 @@ updateNotificationUI(true); updateStatus('Push notifications enabled!', 'success'); - // Test notification - new Notification('HikeMap Notifications Active', { - body: 'You will receive alerts about new geocaches and trail updates', - icon: '/icon-192x192.png' - }); + // Test notification using service worker + if ('serviceWorker' in navigator && registration) { + registration.showNotification('HikeMap Notifications Active', { + body: 'You will receive alerts about new geocaches and trail updates', + icon: '/icon-192x192.png', + badge: '/icon-72x72.png', + vibrate: [200, 100, 200] + }); + } } } catch (error) { console.error('Failed to setup push notifications:', error);