maskable | Create and preview maskable icons in the browser | Icon library
kandi X-RAY | maskable Summary
kandi X-RAY | maskable Summary
Maskable icons allow web developers to specify a full-bleed icon that will be cropped by the user-agent to match other icons on the device. On Android, this lets developers get rid of the default white background around their icons and use the entire provided space. It's important to test maskable icons to ensure the important regions of the icon are visible on any device and in any shape. Upload a maskable icon or drag and drop it into Maskable.app, then preview how it will appear on different Android launchers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Draw a layer
- Create a new layer element
- Exports the specified size to disk .
- Shows the displayed icon of the given item .
- Applies mask to mask .
- Update source display
- Select the given layer
- Loads hidden hidden masks .
- Update preview HTML
- Sets up the export dialog
maskable Key Features
maskable Examples and Code Snippets
Community Discussions
Trending Discussions on maskable
QUESTION
EDIT: If I change SW registration to: -
...ANSWER
Answered 2022-Feb-26 at 07:10My bad :-( or, at least, My Disbelief!
The only "problem" is the "b" in the browser navigation/URL bar. This works on Windows/IIS: -
QUESTION
I am building a vue 3 ts project. Running vite
no problem, when build vite build --debug
the project get error.
The error message show like this .
...ANSWER
Answered 2022-Feb-23 at 09:59Turns out the error is due to the imageUrlFormatter
.
When using vite, it would have the problem when load the image. Hence i created a imageUrlFormatter helper to resolve the path.
After i modify the code for imageUrlFormatter to
QUESTION
This question will need someone from vercel team or sveltekit team as it is related to pwa app that I published to vercel: 1- I placed a minifest1.js file in the "static" folder 2- I placed testserviceworker.js file in the "SRC" folder.
When I run my app locally using my laptop by "npm run build" and "npm run preview", vite registers my serviceworker, my cache is populated and the app is installable as pwa.
When I deploy the same code to vercel, vite fails to register the serviceworker. To experiment I added the serviceworker file to the static folder and added a register button in index.svelte to register the file manully when I press the button.
When I press the button, the serviceworker is registered, I'm able to verify it in dev tools, application tab, cache and able to install my app but my lighthouse report showing pwa part as failed.
So my question is regarding vite registering serviceworker by default upon starting the site. Do I need to add a function in load or onMount with "navigator.serviceWorker.register('testserviceworker.js" or there is some kind of magic configuration in vercel or svelte.config.js to point vite to where the serviceworker.js so it register it upon starting the app?
I added the files for manifest and serviceworker here but I don't think they're relative to my question as it is a configuration issue not code issue:
manifest file:
...ANSWER
Answered 2022-Feb-11 at 22:40I ended with registeration in the onMount. Now when the app is loaded, the serviceworker is registered and pwa is installable. It passed the lighthouse checks. All green.
Here is the code for onMount:
QUESTION
I'm trying to make an installable PWA with Angular.
Following the docs, I ran ng add @angular/pwa
to make my app a PWA. It worked fine. Then I built it with ng build
and served the build using http-server
.
The service worker seems to be working fine, it caches assets, keeps working when I disable the internet, etc.
However, at this point I expected it to ask if the user wants to install the app, but it doesn't. I checked the MDN guide and the app seems to meet all the requirements. On the other hand, this web.dev page says one of the install criteria to be met is to meet a given user engagement heuristic.
So I have no idea for which reason the install hint is not showing, it can be anything between:
- Messed up installation
- I'm testing it from a desktop browser, on http://localhost
- I have to meet the engagement criteria
In case it helps, here are some of the related files:
manifest.webmanifest
...ANSWER
Answered 2021-Nov-23 at 22:01Looks like you did everything just fine. And the @angular/pwa
should do all the work from the box. The only guess I have it's that you're building your app, not in the prod
mode.
Try to follow the next steps:
ng build --prod
cd dist/
http-server
QUESTION
We are trying to host a PWA nuxt and the service worker will register on localhost:3000 only using
...ANSWER
Answered 2021-Nov-14 at 00:37For anyone who may face this issue, @Lawrence Cherone's comment was right; I needed a valid certificate. How to generate a local cert using MKCert.
Install and add MKcert to local root CA
QUESTION
I've got an asp.net Application that uses an manifest.json to be "installed" localy on android devices.
In this manifest I've added: "display":"standalone and "orientation": "landscape"
But it is still rotating 180° if I flip the phone upside down, even if "Screen rotation" is turned off on all these decises. The Problem is, that Those devices have a scanner on top that is used to scann barcodes. So if you flip the phone upside down to scan something the whole webpage turns around and you can't read it anymore when you flip it back up. you eighter have to hold is straight up again, or "shake" it a bit to get it flipping back again.
Edit 20211110: It's a Website, that is running on our local IIS. The Web-page uses a MANIFEST.JSON so that chrome, Firefox and safari promt the user to "install" the Website. This creates a Shortcut on the Main Launcher that opens the website like an Android App. (It's like Twitter, when you brose their website on your andorid Phone it promts you to install the app, but in reality it only creates a shotcut to the website)
...ANSWER
Answered 2021-Nov-10 at 09:56Okay, I figured it out now.
The option "orientation": "portrait"
caused the PWA to be ALWAYS in Portrait, even if the Device is held upside down.
So I just had to remove this option from the manifest.json and now it works.
QUESTION
I'm trying to use imagemagick
to generate PNG images from an SVG for use in a PWA. I'm having trouble working out which image is used when by the PWA. To debug this I'd like to annotate each generated PNG image with an index so I can tell which image the PWA uses in several different scenarios.
Below is an example of the command I'm using to create a 128x128 maskable PNG (10% margin) with white background from a source SVG.
...ANSWER
Answered 2021-Jun-15 at 18:44You can do that in one command line in ImageMagick 7 as follows. Assume the lena image is the result of your command. So I add the following just before the output:
Unix Syntax:
QUESTION
I'm using angular to make PWA app.
- Angular: 12
What is going on is:
- I go to my app (online mode) -> The web app can display properly
- Turn on developer console and change connectivity to OFFLINE
- Press F5 to reload the application
What happens:
- The below image is what it displays on the screen when I hit reload:
This is my ngsw-config.json
...ANSWER
Answered 2021-May-23 at 04:49After having spent hours searching for solutions
I noticed when I built my app using ng build --configuration production
. There is one ngsw.json
file inside my dist
folder.
However, the urls
and patterns
in the generated ngsw.json
file are all empty, like the one below:
QUESTION
I'm trying to use workbox-webpack-plugin.InjectManifest and all the examples I find look something like the code below, but I can't find an example of what src/sw.js
is supposed to look like. I tried searching for example's of service worker files and feel like I might be starting a goose chase learning way more about service workers that I need to without actually getting an example. All I'm trying to do is include my manifest settings with my service worker. I thought I would be able to do this, considering the name of the function is called InjectManifest
ANSWER
Answered 2021-May-14 at 16:20It very much depends on the functionality you'd like in your service worker. This section of the Workbox getting started guide walks through a few use cases, including precaching and runtime caching, and the accompanying code is what would appear in your sw.js
file.
At its most basic, if all you're interested in is precaching all of the assets in your webpack
build, the following could be used as your sw.js
:
QUESTION
This question may seem quite essential. However, I could not find an answer in any of the official Progressive Web Application (PWA) documentation.
The manifest.json
of my PWA contains quite a bit of icons and even a fairly large screenshot.png
that are not essential to the core of the PWA.
ANSWER
Answered 2021-Apr-13 at 09:42The brief answer is "no," none of the (fav)icons or screenshots should be cached by the service-worker.js
if the PWA will not use these.
Moreover, manifest.json
should only refer to icons targeting the Android and/or Chrome browser. Hence, apple-touch-icon.png
should not be mentioned in the manifest.json
.
For iOS, it suffices to place the apple-touch-icon.png
in the root folder of the scope
of your application. The same holds true for favicon.ico
.
There are some more rules for Windows and Mac OS X user agents. These can easily be checked by following the guidelines of this favicon generator or by proving your PWA URL to its favicon checker.
For example, it told me that the following line is best best kept out of index.html
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install maskable
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page