Andoroid how add video and GIF in android local notification? - android

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.

Related

How to play YouTube video in react native Android app without YouTube branding?

We want to play some YouTube videos in my React Native app without YouTube branding. We would like to give the user experience as if the video is playing in a native player. We already tried with webview, react-native-youtube-iframe but still, we are not able to achieve our goal. Either top or bottom section has a YouTube logo, then watch and share options are visible. We want to eliminate those. Any possible way to do this in React Native?
URLs of Youtube videos are different for normal videos and embedded videos.
Normal: https://www.youtube.com/watch?v=DGQwd1_dpuc
Embed: https://www.youtube.com/embed/DGQwd1_dpuc
Please change 'watch?v=' with '/embed/'.
You can also hide controls and information by passing 'showinfo=0' or 'controls=0'.
I recently tried to achieve the similar thing in one of my android app if you can somehow use this particular library
This is an android library and as you mentioned you want to do it in android.
android-youtube-player
I have used this library where i used a player with custom control which helps you override the controls and also this share and next button and even the youtube logo.
Let me know if you need any help further.
Edit:
To enable web UI
IFramePlayerOptions options = new IFramePlayerOptions.Builder().controls(1).build();
Then initialize the player with this controls.
You won't see any logo now.

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.

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

Categories

Resources