Adding gif to Android Expanded Push Notification in Android N - android

I currently use BigPictureStyle in order to add pictures to expanded notifications in Android.
Is it possible to add a gif to an expanded notification preview?
Thank you

As of now, I don't think we can use GIF in push notifications using native functionality. I have been through video that #appukrb posted and along with that I have found out that only QGraph (search for it on play store) provides push notifications with GIF. Otherwise I don't think it is achievable using 'remoteview'.

Related

Show Android Notification always expanded

I have created a exoplayer audio player with a notification to play pause audio.
Inside notification there is a small dropdown arrow to expand and collapse the notification (As shown in images attached) . Is it possible to remove those small arrows and make notification always expanded?
Regards,
Ali
Based on your description, I think that you can use the media control that is introduced in Android 11, it's easy to set up and full of the features that you want. Find an introduction about it here in this developer blog article.
You can also have a look into the UAMP sample to get more insight into how they handled the player notification using the PlayerNotificationManager.

Show video, gif or banner in push notificaion

I have come across the notification which actively changes the content like banners.
AFAIK videos and GIFs are not supported in the notification.
How can we achieve this?
I have searched and found Custom Notification Layout might the solution. But not quite sure.
You can use RemoteViews.
You can have a look at this example also.

Andoroid how add video and GIF in android local notification?

Is it possible too embedded video and gif player into android rich notification like iOS?
If possible, please give me an example.
Thanks in advance.
Since notification is a RemoteView, where is no way to show GIF animation. Allowed only widgets that describes in official documentation.

Titanium PushNotification How to display in one group?

I am facing a problem with development a application.
I am using a Cloud Push Notification with Titanium Appcelerator.
I have need display push Notification in Group.
How display this is display in single particular particular tab?
I am sharing 2 images
Currently looking like this.
I have need look like this. How do?
You have to use a Big View Notification Style but it is only available in 4.1 or newer
quote from here:
A notification's big view appears only when the notification is expanded, which happens when the notification is at the top of the notification drawer, or when the user expands the notification with a gesture. Expanded notifications are available starting with Android 4.1.
in the same document, you can find a sample how to use this. there are also som tips/hints how to maintain compatibility with older devices (not only regarded to the big view)
you must put the following code in your TiApp.xml
<property name="acs-grouped-notification-message-" type="string">You have $number$ unread messages.</property>

Dynamic notification icons (large) in Android, targeting 2.2

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).

Categories

Resources