title: Why does my progressive web app open in a browser when I have fullscreen specified in my app manifest?
body: <p>When I install my web app to homescreen on Android without a service worker, everything works as expected. I can click my home screen icon and my app launches with a splash screen and then I see my app in fullscreen mode. When I add in the service worker registration code and install to home screen, my app launches in a browser window and seems to ignore my manifest file.</p>
  
  <p>Something to note is that without the service worker my app only has an icon on the homescreen. with the service worker code it becomes fully installed with the "new improved add to home screen" and there is an icon on my home screen as well as in my installed apps panel.</p>
  
  <p>Here is my code:</p>
  
  <p>web-app.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
    &lt;head&gt;
  
      &lt;title&gt;Web App&lt;/title&gt;
  
      &lt;meta name = "viewport" content = "user-scalable=no, width=device-width"&gt;
      &lt;meta name = "mobile-web-app-capable" content = "yes"&gt;
  
      &lt;link href = "manifest.json" rel = "manifest"&gt;
      &lt;link href = "web-app.css" rel = "stylesheet" type = "text/css"&gt;
      &lt;link href = "web-app.png" rel = "icon" type = "image/png"&gt;
  
    &lt;/head&gt;
  
    &lt;body&gt;
  
      &lt;h1&gt;Android Web App!&lt;/h1&gt;
  
      &lt;img src = "/web-app.png"&gt;
  
      &lt;p&gt;This page can be viewed in any browser, but it can also work in a web app! If you are viewing this page in a full screened webview on your mobile device, you are looking at a fully functional web app! You can use this technology to better connect with your users or create a full screen mobile experience for your HTML5 games!&lt;/p&gt;
  
      &lt;script type = "text/javascript"&gt;
  
        navigator.serviceWorker.register("web-app-service.js");
  
      &lt;/script&gt;
  
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>manifest.json:</p>
  
  <pre><code>{
  
    "author": "PoP Vlog",
    "background_color": "#ffffff",
    "description": "Progressive Web App Example with Offline Mode",
    "display": "fullscreen",
  
    "icons": [{
  
        "src": "/web-app.png",
        "sizes": "192x192",
        "type": "image/png"
  
    }],
  
    "lang":"en",
    "manifest_version": 2,
    "name": "Web App",
    "orientation": "portrait",
    "scope":"/",
    "short_name": "Web App",
    "start_url": "/",
    "theme_color": "#ffffff",
    "version": "0.2"
  
  }
  </code></pre>
  
  <p>web-app-service.js:</p>
  
  <pre><code>self.addEventListener("install", function(event) {
  
    event.waitUntil(caches.open("web-app").then(function(cache) {
  
      return cache.addAll([ "/", "/web-app.html", "/web-app.css", "/web-app.png"]).then(function() {
  
        self.skipWaiting();
  
      });
  
    }));
  
  });
  
  self.addEventListener("activate",  function(event) {
  
    event.waitUntil(self.clients.claim());
  
  });
  
  self.addEventListener("fetch", function(event) {
  
    event.respondWith(caches.match(event.request).then(function(response) {
  
      return response || fetch(event.request);
  
    }));
  
  });
  </code></pre>
  
  <p>I couldn't find a lot of documentation on this, but clearly the behavior changes when I remove the service worker registration code from my html document. I suspect that the problem lies in my web-app-service.js file.</p>
  
  <p>EDIT: 11/01/2017</p>
  
  <p>When I completely comment out my fetch event listener, my app works as expected, but add to home screen only installs an icon on my home screen. When I add to home screen with the fetch event listener, I get a full install of my web app into my apps panel and my app only opens in a browser window with full url bar and everything. This problem has something to do with adding the fetch capability to my service worker.</p>
  
  <p>EDIT 11/08/2017</p>
  
  <p>I have discovered that I only have this problem on my Node JS HTTPS test server when accessing my web app through a local IP address. The web app works fine when I run it from my Github Pages site. This leads me to believe it is a problem with scope in the app manifest or perhaps my Node server.</p>