When I look at the manifest.js in Chrome DevTools I can see that the logo and colors are there. However, when I start the website from my homescreen on my android device, neither the background or theme color is loaded, nor my splash screen is shown. Any idea why?
Manifest.json:
{
"short_name": "Example",
"name": "Example",
"icons": [
{
"src": "images/logo_192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "images/logo_512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "./",
"display": "standalone",
"theme_color": "#a300c4",
"background_color": "#c46a00"
}
Screenshot:
EDIT
I found the mistake. I was browsing the website via a remote device using the Chrome DevTools. Port-forwarding to localhost:3000 doesn't match the https requirement for the splash screen to get triggered.
Now the pwa starts in standalone mode, the colors and the splash screen are shown correctly.
However, the splash screen logo is not shown and I have no idea why. The path to the image is correct and the image exists with the correct filename and type.
Any suggestions?
The theme_color member is a string that defines the default theme color for the application. This sometimes affects how the OS displays the site (e.g., on Android's task switcher, the theme color surrounds the site).
Web app manifests are part of a collection of web technologies called progressive web apps (PWAs), which are websites that can be installed to a device's homescreen without an app store.
Using manifest. json , you specify basic metadata about your extension such as the name and version, and can also specify aspects of your extension's functionality (such as background scripts, content scripts, and browser actions).
Android OS will show the splash as grey/black on Dark Mode and white on Light Mode. I haven't tried using transparent as the theme_color, but I feel like that would be wrong.
Currently only Chrome and Firefox behind flag manifest.install.enabled supports Web App Manifest, and both says supporting theme_color, what means no need for theme-color meta-tag. I think documentation must be fixed to and require only one of properties, and also mention that valid theme-color would rewrite theme_color value.
Failures: Manifest does not have background_color, Manifest does not have theme_color. Even though background_color is actually present and set to rgba (0,0,0,0). Sorry, something went wrong.
This means that PWAs receive no support for icons, minimal-ui, fullscreen, theme-color, and orientation. Fortunately, there’s still a way around this which is to use the <apple-touch-startup-image> meta tag.
"If you page already has a theme-color meta tag — for example <meta name="theme-color" content="#2196F3">
— then the page level configuration will be used instead of the value in the manifest."
from: https://developers.google.com/web/updates/2015/08/using-manifest-to-set-sitewide-theme-color
Only thing I see wrong with this manifest is start URL. Change it to something like below
"start_url": "/index.html",
or
"start_url": "https://example.com/myapp/",
If this didn't help, please host your app in some public domain and share the URL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With