For Progressive Web App's, when we push a notification to the mobile device; we get Chrome Browser icon in the Notification System Tray.
Can we have our custom icon there?
Is there any settings required in the manifest.json file?
I have found the answer to my question:
We need to pass the property badge in the options notification object.
The value of the property badge is an URL to the image icon you want to show. It should be of right dimensions. This image is then masked accordingly by the device OS(Android/iOS)
More details about this property can be found here
The showNotification method has a parameter to specify an icon for the notification.
You can find an example on the ServiceWorker Cookbook.
Related
I'm using A-Frame with ARjs, when access camera from the phone, we have a popup ask permission and I want to customize the popup with my text, have a beautiful styles with CSS like SweetAlert. Is it possible. Thanks for your help!
No, you can't. Permission dialogues are trusted browser UI not customizable by content.
I make a Xamarin.Forms App and making permissions for location,camera etc. I made custom text permission dialog in IOS for location like this:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Test Message.</string>
but i can't find how to make it in Android. Any suggestion?
The short answer is, you can't.
As per Android's documentation:
Note: Your app cannot customize the dialog that appears when you call launch(). To provide more information or context to the user, change your app's UI so that it's easier for users to understand why a feature in your app needs a particular permission. For example, you might change the text in the button that enables the feature.
What you can do, and they advise the developers to do, is to adjust your UI or display a pop-up describing why you'll require the specified permission.
I have added multiple SAML Apps configured in G Suite using built-in options including Atlassian and Salesforce. When selecting the built-in options, I see no way to provide an icon and they do not appear to contain an appropriate icon (they all have a pencil icon). As a result, the app launcher is full of icons that you cannot tell apart. I noticed if I create a custom SAML App then I have an option to upload an icon -- though I see no way to change it after the fact.
Am I missing something or is this expected behavior? If I want custom icons do I need to create custom apps? Is there perhaps an API I can call to configure this?
Try this from the Set up your own custom SAML app:
(Optional) Click Choose file next to the Upload Logo field to upload a PNG or GIF file to serve as an icon. The file size should be
256 pixels square.
This topic is well covered on Android and iOS (ANCS) however it is not discussed in any documentation for Web notifications.
My goal is to create a custom Chrome notification badge for mobile (see image below). I would have thought it was as simple as setting a field in web.manifest.json or in the payload sent to FCM but these have no effect.
I found some interesting discussion around a badge and purpose field for web manifest here - https://github.com/w3c/manifest/issues/480 but does not appear to be in use by Chrome.
Please see here for a complete explanation on how making badges work on chrome PWAs. It explains the file format for the badge image itself as well as the format of the message payload.
https://stackoverflow.com/a/66688393/11222505
I recently received a real headache problem for UWP apps.
Basically I would like to change the main Icon of my app depending on an action.
Let's say I would like to change the App Icon if a certain user logs into my app so that he does not see default App Icon after closing the app.
I found different links which refer to work on tiles, which works perfectly fine. But I did not come up with a solution to change the App's Icon.
Is there a way like in iOS to use AlternateIcons or in Android to just call an Alias?
Tiles are technically the icons in the UWP world. You can update the live tiles as you desire with notifications and they can provide richer visual surface than classic icons.
For the App List and Taskbar icons however, those are just static and you cannot change them at runtime. They come from the Package.appxmanifest Visual Assets section, so you have to define them ahead of time.
You however use Badge notifications to display simple info next to the app icon in the Task bar as well as on the main app tile.