diff --git a/test-apps/android-test-app/app/src/main/assets/public/index.html b/test-apps/android-test-app/app/src/main/assets/public/index.html
index 99d4950..5f60ee0 100644
--- a/test-apps/android-test-app/app/src/main/assets/public/index.html
+++ b/test-apps/android-test-app/app/src/main/assets/public/index.html
@@ -62,6 +62,11 @@
Loading plugin status...
+
+ 🔔 Notification Received!
+
+ Check the top of your screen for the notification banner
+
@@ -232,7 +237,8 @@
const notificationTimeReadable = notificationTime.toLocaleTimeString();
status.innerHTML = '✅ Notification scheduled!
' +
'📥 Prefetch: ' + prefetchTimeReadable + ' (' + prefetchTimeString + ')
' +
- '🔔 Notification: ' + notificationTimeReadable + ' (' + notificationTimeString + ')';
+ '🔔 Notification: ' + notificationTimeReadable + ' (' + notificationTimeString + ')
' +
+ '💡 When the notification fires, look for a banner at the top of your screen.';
status.style.background = 'rgba(0, 255, 0, 0.3)'; // Green background
// Refresh plugin status display
setTimeout(() => loadPluginStatus(), 500);
@@ -411,6 +417,39 @@
}
}
+ // Check for notification delivery periodically
+ function checkNotificationDelivery() {
+ if (!window.DailyNotification) return;
+
+ window.DailyNotification.getNotificationStatus()
+ .then(result => {
+ if (result.lastNotificationTime) {
+ const lastTime = new Date(result.lastNotificationTime);
+ const now = new Date();
+ const timeDiff = now - lastTime;
+
+ // If notification was received in the last 2 minutes, show indicator
+ if (timeDiff > 0 && timeDiff < 120000) {
+ const indicator = document.getElementById('notificationReceivedIndicator');
+ const timeSpan = document.getElementById('notificationReceivedTime');
+
+ if (indicator && timeSpan) {
+ indicator.style.display = 'block';
+ timeSpan.textContent = `Received at ${lastTime.toLocaleTimeString()}`;
+
+ // Hide after 30 seconds
+ setTimeout(() => {
+ indicator.style.display = 'none';
+ }, 30000);
+ }
+ }
+ }
+ })
+ .catch(error => {
+ // Silently fail - this is just for visual feedback
+ });
+ }
+
// Load plugin status automatically on page load
window.addEventListener('load', () => {
console.log('Page loaded, loading plugin status...');
@@ -419,6 +458,9 @@
loadPluginStatus();
loadPermissionStatus();
loadChannelStatus();
+
+ // Check for notification delivery every 5 seconds
+ setInterval(checkNotificationDelivery, 5000);
}, 500);
});