Show video, gif or banner in push notificaion - android

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.

Related

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.

Adding gif to Android Expanded Push Notification in Android N

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

How to display a GIF in a Service?

I'm building an app similar to Facebook Messenger on Android and I would like to display a GIF as the chat head/bubble. I know the chat head operates as a service and found a way to display GIFs on activities (http://android-er.blogspot.ca/2014/03/play-animated-gif-with.html), but can't get it to work for a service.
Separate, but likely related issue: I'd also like to display GIFs in the popup window (after the chat head is opened).
Android actually can decode and display animated GIFs, using android.graphics.Movie class.
This is not too much documented, but is in SDK Reference. Moreover, it is used in Samples in ApiDemos in BitmapDecode example with some animated flag.
Find here:
https://stackoverflow.com/a/7772170/3626214

How to implement the gmail notification?

I have a scenario wherein in need to implement a similar effect like the one in gmail app notification.
while closing the notification if you see in the screenshot the archive and reply view are overlapped by the email textview.
Please suggest any ideas
Thanks
It is possible to update notifications once you've created them. See here for more information.
Just set a big view style to your notification and the dragging mechanism will be added for you. Note this will only work starting from Jelly Bean 4.1.
This guide will be of some help: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

Downloads, Shown in notification bar?

As far as I know we can create notifications in Android using Notification Manager + remote Views.
I am Creating a notification for downloading Mp3 files. And I want an animations beside It. So far I have learned from forums that it is not possible.
However I saw A video for an android App which downloads and displays animation beside it while downloading it. Link: http://www.youtube.com/watch?v=yNcs-sS2nFU&feature=related
Moreover its the same animation used by the browser. How can they do it?
If any one suggests using level drawable for me, Please also suggest still I have to send a whole remote View to the notification manager with the same Notification ID. It will override it. That gives a animation like thing if I do it again and again. Is there no way to update remoteviews without sending the changed remoteviews to Notification manager.
WHY, I dont want the above mentioned animation effect?
Because It hangs the android. If the updates are sent more faster then 2000ms.
This question is also asked elsewhere at stackoverflow but never been answered.
The answer to all our problems,
http://developer.android.com/reference/android/app/DownloadManager.html
There is a built in download manager in android.
My guess is that particular animation you are seeing (the downward moving arrow) is provided by the system. I don't think you will be able to place your own custom animation in a standard notification.

Categories

Resources