I have a SPA PWA React app.
It is installed and running in standalone mode on the mobile device (Android+Chrome).
Let’s say the app lists people and then when you click on a person it diplays details using
Now, I’m sending push notifications from the server and receiving them in the service worker attached to the app. The notification is about a person and I want to open that person’s details when the user clicks on the notification.
The question is:
- how do I activate the
/personroute on my app from the service worker
- and pass data (e.g. person id, or person object)
- without reloading the app
From what I understand, from the service worker
notificationclick event handler I can:
- focus on the app (but how do I pass data and activate a route)
- open an url (but
/personis not a physical route, and either way – I want avoid refreshing the page)