progressive-web-apps

Background events in progressive web apps? (building an alarm clock app)

ⅰ亾dé卋堺 提交于 2019-12-22 06:34:51
问题 I am playing around with progressive web apps, and one scenario I wanted to try building was an alarm clock app. I figure to make this app work properly, it will have to run in the background and become active once the internal conditions (current time === alarm time) have been met. Is this possible? Or do progressive web apps not yet have the freedom to operate in the background/access phone features through API's. Thanks! 回答1: Setting background timers isn't yet possible. The ScheduledTask

How To Log Whether PWA Is Being Viewed As A Website Or App

穿精又带淫゛_ 提交于 2019-12-22 06:09:29
问题 I'm working on a PWA (progressive web app) and I would like to be able to track whether someone is just viewing it as a website or if they installed it and are viewing it as an app. Is there any way to do this? I can't think of any ways, since they both use the same files (both use manifest.json and manifest.json directs both to the same index.html). Windows 10 gives the ability for PWAs to be installed from their app store. At that point, you might be able to gather some analytics.

Strategy for Push notifications on Safari

ぃ、小莉子 提交于 2019-12-22 04:46:08
问题 I am working on implementing a PWA which needs to send push notifications, we are looking at a solution for sending push notifications to browsers running on ios(We are using Firebase(FCM) for everything else.) What would be a good strategy to make push notifications on all platforms including ios? We are looking at sniffing the user-agent and use FCM for non-ios users, switch to websockets for ios users. We aren't sure how viable this approach is gonna be. Any suggestions on this approach or

Angular 7 - Service Worker PWA + SSR not working on server

青春壹個敷衍的年華 提交于 2019-12-22 04:30:23
问题 I am struggling to make my Server Side Rendering and Service Worker cooperate on server Side. Information regarding localhost -> Working This is working as expected. The service worker works and updates my app on every update. Moreover; a curl localhost:8082 send me back my info. I start my app with the following command : npm run ssr "ssr": "npm run build:ssr && npm run serve:ssr", "build:ssr": "npm run build:client-and-server-bundles", "serve:ssr": "node dist/server.js", "build:client-and

I need to access localstorage or cookie from within the serviceworker

余生长醉 提交于 2019-12-22 03:42:32
问题 I wish to make a fetch call after the push event for fetching the notif data through an internal api with user specific params which are stored in the localstorage or cookie such as usertype or country id .. how do i do this ? 回答1: You cannot use Local Storage in service workers. It was decided that service workers should not have access to any synchronous APIs. You can use IndexedDB instead, or communicate with the controlled page using postMessage() . By default, cookies are not included

Debugging web apps added to home screen on iOS Safari

有些话、适合烂在心里 提交于 2019-12-22 03:23:19
问题 I'm trying to debug a web app that is added to home screen. I have enabled web inspector on safari. I am able to debug the app if I open in iOS safari but when I add the app to home screen and try to debug, it shows 'No Inspectable Applications'. Any help would be appreciated. iOS version: 11.2 MacOS Safari version: 11.0.1 回答1: You should put focus on the app first and then press: Option+Command+i So you do not open the inspector in advance in this case. This is not possible because you can

Possible to have multiple `manifest.json` for PWA?

被刻印的时光 ゝ 提交于 2019-12-21 12:34:15
问题 Consider I have:- PWA at myapp.firebaseapp.com with it's own manifest.json . Admin for the PWA at myapp.firebaseapp.com/admin Is it possible to have another manifest.json for the admin URL to allow "Add to Home Screen" on the same PWA? 回答1: Sure; the manifest for a given page is determined by the presence of a DOM element with details about the manifest's location. Assuming you have full control over the HTML for /admin and for all other pages, you can include <link rel="manifest" href="/path

Is it possible to track geolocation with a service worker while PWA is not open

血红的双手。 提交于 2019-12-21 12:12:37
问题 Is it possible to read from local storage and track geolocation in PWAs with a service worker while app is not open on phone (in background) So far my research is pointing to no, and I am finding that the PWA needs to be open for location services. Thank you, 回答1: The solution is at hand and has been for some years now as this POC clearly testifies. Unfortunately W3C and lobbyists such as Jake Archibald have fought tooth and nail to prevent it from being made available :-( Why? I know not.

PWA add to home screen not showing popup

一曲冷凌霜 提交于 2019-12-21 03:53:16
问题 I implemented PWA for my static site. service worker register successfully and my page is also working in offline as I expected but the real problem is in add to Home screen I included manifest.json with appropriate icons and still, I don't see the add home screen pop up and while trying to push the add to home screen from inspected only i able to see the popup This my site URL: https://www.savesoftinc.com/ Manifest JSON: { "name": "Save Soft", "short_name": "SaveSoft", "start_url": ".",

Which icon sizes are required for progressive web apps (PWA) as of Q1 2018?

╄→гoц情女王★ 提交于 2019-12-21 03:36:09
问题 Which application icons and sizes are required for a progressive web app (PWA)? For example, should I include Apple icons if Safari doesn't support PWAs? It seems like a common need among developers, but at this time, I am not certain if there is an official spec or guidance for it. 回答1: If you want to include a complete set of icons for Android : icon-72x72 icon-96x96 icon-128x128 icon-144x144 icon-152x152 icon-192x192 icon-384x384 icon-512x512 There is some helpful tools like https://app