I searched a lot for this question in these last days and any answer that I saw until now it couldn't help.
I'm developing an app with React-Native and after trying with a lot of modules to send push notifications, I decided to use the services of Backendless.
Their system works very fine but I can't find an answer to what or where change to show a custom icon instead of the default white square in the notification.
I inserted the meta-data firebase.messaging.default_notification_icon in AndroidManifest.xml, I tried to make modifications in the function that set icon inside of the backendless module, tried to use Android vector drawable instead of png and some others things, everything I tried not worked.
Has someone any suggestion?
Thanks
From the Backendless support topic:
To set a custom icon for the Android push notification please follow the next steps:
Locate your icon in the drawable or mipmap directory of your Android project.
Create the push template from the Console and set the value of “Small Icon” field to the name of your icon (but without file extension).
Save the template and send the notification from Console or with API.
Related
I am having some issues displaying the number of notifications on badges on Android while using expo managed workflow.
I want the badge to update when the app is killed.
On IOS is working fine by setting the badge variable a number but somehow on android i only get a little dot that is telling me that there are unread notifications but no badge is shown.
This is how it should display:
But i am getting only a dot on the icon like on this example:
My question is that by using the badge variable should while sending out push messages from the backend should this be working on android aswell and i am messing something up or do i need another approche on android?
Any suggestions are welcome since i cant find any answer on this and been searching for days now.
Many thanks,
Trix
Android notifications icon works different than on iOS because these are just one color, with transparency.
So when you reference the icon image make sure it has the transparency, if not, all the form is filled.
Also check your app.json to add this:
https://docs.expo.dev/versions/latest/sdk/notifications/#custom-notification-icon-and-colors-android-only
https://docs.expo.dev/versions/latest/config/app/#notification
How do I have changing Icons similar to how Instagram notifications icons changes by who sends the message.
The way I understand it is notifications can only access image in drawable and mipmap that once the apk is built they can only access that image. What I want to do is allow user to give any image and make it the notifications Icon
Please check _showBigPictureNotificationURL() method from the plugin:
flutter_local_notifications
I'm trying to update an existing app, it's been a few years since the last update and I've updated Android Studio to the most recent version v3.5.3. Among other things I want to change the app icon, so I've updated all the PNG files.
However, in the emulator it keeps showing the old default icon.
If I understand correctly, there is a new feature since API-26 which allows for something called adaptive app icons, but I can't figure out how to update this icon.
The #mipmap/ic_launcher.xml file seems to be some sort of vector file, which describes paths and strokeWidth and lines to construct the default icon. I tried and searched all over, but I have no clue how customize this type of icon to something with my business logo.
Do I have to turn my custom logo into a vector image? If so, how can I do this? Using which app or utility? Can't I still just use my PNG files like previously?
I just added an icon to my app using the Android Image Asset Studio using an xml file as the foreground and a plain color as a background. Now in the testing I've done with it, the background of the icon is displaying as the correct color, but the foreground is just the white android logo. I have deleted the app off my phone and reinstalled it in case it was cached as the previous logo, and I don't really know what else to do with it to test it or make it show up correctly, especially since the background changed but the foreground didn't. Any help would be appreciated.
Github link:
www.github.com/jollygreenegiant/WannaCook
Just rename your desired mipmap icon's resource into any name different form ic_launcher
Also make sure you changed the icon name in AndroidManifest.xml
I'm assuming you're testing on API 26+ (not specified in question).
In that case, the Adaptive Icon assets found in your repo (.../res/mipmap-anydpi-v26/) are overriding the PNG icons you hoped to use. This explains why renaming your icon files would resolve the issue, as mentioned in another answer. You can simply remove those files, to correctly resolve the issue. (Or, look into creating your own adaptive icon as described at the link above.)
Your app icon is still mipmap/ic_launcher, and it's foreground is set to the white android icon set by the Android Studio. You should change the code of foreground.
I would like my application icon to be available to other applications.
I understand this is a bit unclear so will try explain:
Applications such as Astros program manager lists applications with their icon. For all apps this is the correct icon as on the launcher, except mine which is displaying the standard android icon. I have set my icon as the manifest using: android:icon="#drawable/runninglate"
This works on the launcher but Astro still shows the default icon from when I create the project (which I deleted a long time ago). I have also tried renaming my icon file to icon.png in case this was a standard. This also failed to work.
I am clearly doing something wrong, or have missed a setting somewhere, can some one point me in the right direction.
Make sure you have your icon in the <application> element, perhaps in addition to having it in the <activity> element of the activity that should appear in the Launcher.
Seems it was a caching issue. I re-flashed my phone today for an update and the correct Icon was shown using the same APK as I was using when it wasn't showing. Maybe a clear data on the displaying app was all that was required!