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
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
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.
I am building an Android SDK which sometimes need to display notifications to the user in the notification drawer:
Naturally, I would like to use the app icon when setting the setSmallIcon() property of the NotificationCompat.Builder. The problem is that an SDK does not know in advance what is the icon of its embracing app.
Is there a way to get a reference to the app icon asset programatically, in run time?
I am trying to build an android app using Cordova. Is there any plugin to show an image notification in the status bar.
Not icons but full image like this
http://imgur.com/XDj7fXI
If your app also needs to record GPS data in the background, then try this plugin:
https://www.npmjs.com/package/cordova-plugin-mauron85-background-geolocation
You have the option to add an image/icon and various other notification settings for when the app is in the background:
option.notificationTitle
option.notificationText
option.notificationIcon
option.notificationIconColor
If you don't want or need background GPS, then I haven't seen a plugin that has that functionality so far.
I hope this helps.
This question has been asked before, but has not been properly answered yet. I know this is possible but we're feeling a little confused.
We need to display custom/dynamic images in the status bar when push notifications are received. We're concerned with the larger image seen in the pull-down, not the small image in the actual status bar. Because they need to be dynamic, the images can not be packaged with the apk and we are trying to target Android 2.2
What we're trying to achieve is similar to how Facebook displays the profile image of the user who initiated the notification in the notification bar. It's also similar to how whatsApp shows the group image in the notification bar when a new push notification arrives.
From what we've read, this is possible only in Android 3+, sdk 11. But that can't be true.
We've installed both Facebook and WhatsApp on an Android phone running 2.3.4 and sure enough, custom icons display in the notification bar.
So what's the secret? How do they do it? How can we do it?
so what you are trying to do is set the setLargeIcon(Bitmap icon) in the notification builder. This is available in APi 11 and above (honeycomb). The notification builder in the compatibility package v9 can set it for you, but it will only appear on api 11 and above.
To achieve the same effect in 2.3 and below you must create a custom notification layout and set it with setContent(RemoteViews views) in Notification.Builder to generate a custom layout. This can be styled with a large icon on the left side to imitate the > API 11 styles.
Creating custom layouts is tricky and many things have to be taken into account, such as available screen size on other devices to display the notification, and themed text colors (especially as notifications used to be dark text on white bg, now they are light text on dark bg) There plenty of guides and even SO posts that can help you out (such as this one)
In regards to getting a dynamic image, when the phone receives the message (push notification or whatever) and your app goes to build the notification, you can do a small http request to pull a dynamic image before building the notification. This will delay the posting a few seconds, but it doesn't really matter. Then you can get the resulting image and use it in the notification. The specific image can be chosen by sending some data with the (im assuming push notification) that identifies what photo, such as a url, or an id that you can append onto an already existing url in your notification building part of the app.
Hope this helps, any followups just ask :)
You can't use anything but prepackaged drawables as your notification icon as seen on status bar. And no, you did not see anything like you look for in FB app (or you talk about notification area seen when you pull it down).