progressive-web-apps

Chrome does't recognize my manifest.json when I prompt “Add to homescreen” banner

倾然丶 夕夏残阳落幕 提交于 2019-12-12 18:19:10
问题 I want to create a manifest to launch a "Add t homescreen" banner. However, it seems that chrome does't recognize my manifest file to launch the banner. Here in the application tab in chrome debugger, the fields should be filled with the information from manifest.json The manifest file is declared correctly, because it points to the right file. Here is the manifest.json: 回答1: It seems that the Web App Manifest is not being parsed correctly. You can validate it using the Web Manifest Validator

Browser support for Service Worker Task Scheduler

人盡茶涼 提交于 2019-12-12 11:42:08
问题 Does anybody know, whether the TaskScheduler API for service workers as described here is supported by any browser or when or whether it will be implemented in the future? Unfortunately there is only very poor documentation about the features of service workers in regards to different browsers. So any references would be much appreciated. 回答1: https://www.w3.org/TR/2015/NOTE-task-scheduler-20150723/ contains the following note: This specification is being republished as a Working Group Note

Access url parameters of pwa address

假装没事ソ 提交于 2019-12-12 10:46:45
问题 I am new to ionic 2. After a searching everywhere I can not find a direct answer given the following scenario: I am building a PWA with ionic 2 (because I will later develop hybrid versions of this app) the address where users will find and access my app will be a standard domain like https://welcometotheapp.com?viewid=0101018737abcdefg I am using ionic 2, recently installed on windows 10 I have started a new blank app project My question is NOT related to navigation. My question is how do I

Apply changes to Web App Manifest on an installed PWA

一世执手 提交于 2019-12-12 10:37:34
问题 If I want to make changes to my Progressive Web App, e.g. a slight change on the app name, or update the logo, is it possible to force an update on all my users' installed apps? I tried adding "?v=2" to the manifest URL, <link rel="manifest" href="/manifest.json?v=2" /> And also forced an update on the service worker. However, it doesn't seem to apply the new changes on the installed app. I tried this on Google Chrome on Android. 回答1: Forcing the update explicitly is not possible as per the

Ionic 3's PWA & Firebase Cloud Messaging registration

我与影子孤独终老i 提交于 2019-12-12 08:05:27
问题 I was following this article here (which is not complete unfortunately) in attempt to learn how to friend Ionic 3 based PWA and Firebase Cloud Messaging: Push Notifications with FCM What I did: as advised in the article added FCM libraries into service-worker.js: 'use strict'; importScripts('./build/sw-toolbox.js'); importScripts('https://www.gstatic.com/firebasejs/4.9.0/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/4.9.0/firebase-messaging'); firebase.initializeApp({ /

Send push notifications thorugh GCM in progessive web apps

六眼飞鱼酱① 提交于 2019-12-12 05:38:42
问题 this is my code to send push notification in progressive web app.It works property when i click on button sendRequest() function is called and notification sent properly. but push event is not fired.is there anything wrong in this code function sendRequest(){ navigator.serviceWorker.ready .then(function(registration) { registration.pushManager.getSubscription() .then(function (subscription) { curlCommand(subscription); var root = 'http://jsonplaceholder.typicode.com/posts'; var title="Push

Inroducing service-workers on mobile site

别来无恙 提交于 2019-12-12 03:05:37
问题 I'm new to service workers. I want to integrate service workers in my site.My motive is to improve the performance of my website not making the website offline.Its a real estate website. So what i have done till now is create modular templates of my site and store them in the cache. for e.g. template1 <div> <p>#data</p> <div> whenever a fetch occurs on my page i first call an api through ajax get the data and replace the #data variable in the cache response by actual api response and then i

Missing push data on Android's PWA but not on Desktop

旧街凉风 提交于 2019-12-12 00:37:07
问题 UPDATE: Updating Chrome from 58 to 76 has resolved the issue. According to this link Chrome v50+ supports payload which has not been the case here. Either there's a bug / issue with Chrome 58 or there's a bug somewhere in the code. Still interested to learn which. I'm following the same procedure to send my push message for both Mobile and Desktop. Server (node.js): const webpush = require('web-push') const vapidKeys = { publicKey: '...', privateKey: '...', } webpush.setVapidDetails( 'mailto:

How to add a WebApp shortcut to home screen programatically from an android app, to launch WebApp in Full Screen

夙愿已清 提交于 2019-12-11 18:55:44
问题 How to mimic the add to home screen functionality used by google chrome. When clicked that shortcut, it opens in fullscreen. I tried in Android to add a shortcut, but could not find anything to open in full screen, but I think Flipkart was able to do it. Is there any method to do like chrome does. 回答1: When you click on "Add to Home screen" in chrome, two tings happens. 1) If your site meets minimum PWA criteria (valid Manifest.json, service worker, served though HTTPS with a valid

How to inject JS file to interact with PWA in Swift

人盡茶涼 提交于 2019-12-11 18:48:31
问题 In swift iOS project, I have added JS file. And using WKWebview, my question is, In iOS do we need to write? How we can inject this ? const JSInterface = { alertMe: (text) => { alert(text + '-> in hello.js'); } } Before I have written functions in JS file like; function alertMe(text) { alert(text + '-> in hello.js'); } and injected JS func loadJavaScript() { self.jsContext = JSContext() if let jsScript = jsScriptText(){ //Add an exception handler. self.jsContext.exceptionHandler = { context,