Following this example, I see how PWA can open urls but how can I use push notification to launch the app itself? Not in the browser but the full screen version PWA.
相关问题
- Plugin with id 'com.google.gms.google-services
- google-drive can't get push notifications
- PWAs on iOS 12 no longer shares Service Worker cac
- Can you set the Location header in a chunked http
- What are the advantages ManageIQ has over OpenStac
相关文章
- How can I add media attachments to my push notific
- File Upload of more than 4GB
- How to convert a FCM token to APNS token?
- How to open current activity which is open while c
- Does the apple push notification distribution cert
- How posting One Signal notification's addition
- App not showing Notification receiving FCM when th
- Progressive web app(PWA) vs Electron vs Browser ex
As of Oct/2018:
I managed it to work using Chrome 69. In this example, it's a sub-application (www.example.com/application).
In short: double check the paths!
And also I had issues with not loaded cookies (login info) whenever I launched the app from a Push Notification, it opened fine, but not logged in. If you close it and tap the app icon previously added on homescreen, the app is launched already logged in.
I accomplished it using the following (see comments):
1) serviceworker.js
2) manifest.json
This is a quirk in Chrome.
If a user adds a web app to their homescreen with "standalone" in their manifest when ever the user clicks the web apps icon it will open without the URL bar.
When a push message is received and that same web app is opened, the URL bar will not be displayed if the user has "recently" opened the web app from the homescreen icon (Currently in the last 10 days). If the user hasn't used the home icon within that time period, a notification click will open with the URL bar displayed.
See this issue on Chrome for more info: https://bugs.chromium.org/p/chromium/issues/detail?id=541711
Specifically:
It's also worth noting that PWA vs Browser itself isn't the right way of thinking of this. You are always launching in the Browser, just in different modes, "standalone" vs "browser" for example.
PWA (Progressive Web Apps) is largely a term to describe a use of a set of API's to make a good user experience with new web technologies (i.e. service workers, push, web app manifest etc).
Taken from Jake Archibald's emojoy demo: