maui
maui copied to clipboard
.Net MAUI 7 Android, Image Gif Animation Not Playing in Release Mode, Normal in Debug Mode
Description
I tried to release the .net maui apps that I made, when in debug mode everything works fine, but the problem occurs when I release my application to Android, the gif image that I use for loading doesn't work properly, no animation is playing, it only displays the native image.
Then I tried to make a simple application to confirm this problem, and yes, the problem remains the same, here I attach the simple code that I made, where this coding runs normally in debug mode, but in release mode the gif animation doesn't play
Steps to Reproduce
The simple code
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MiCetApp.View.StartPage"
Title="StartPage"
BackgroundColor="#6789ba"
Shell.NavBarIsVisible="False">
<Grid
RowDefinitions="*, Auto, Auto">
<Image
HeightRequest="150"
Source="{Binding StringFormat=Resources/Images/loading_animation}"
IsAnimationPlaying="False"
x:Name="gifAnimation"/>
<Button
Grid.Row="1"
Text="Play Animation"
Clicked="PlayAnimation"/>
<Button
Grid.Row="2"
Text="Pause Animation"
Clicked="PauseAnimation"/>
</Grid>
</ContentPage>
private void PlayAnimation(object sender, EventArgs e)
{
gifAnimation.IsAnimationPlaying = true;
}
private void PauseAnimation(object sender, EventArgs e)
{
gifAnimation.IsAnimationPlaying = false;
}
Version with bug
6.0.312
Last version that worked well
6.0.312
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 11.0 API 31.0
Did you find any workaround?
No response
Relevant log output
No response
Hey there, can you put up a repo?
Hey there, can you put up a repo?
Hi @NonameMissingNo this's my example repo https://github.com/syachrodi/MiCetApp
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I also encountered the same problem, which urgently needs to be solved!
Is there any workaround to this issue, please?
Works neither on IOS nor Android
not work on iOS and Android +1
I was able to resolve by simply doing this
protected override async void OnAppearing()
{
base.OnAppearing();
await Task.Delay(100);
BreatheImageLoader.IsAnimationPlaying = false;
await Task.Delay(100);
BreatheImageLoader.IsAnimationPlaying = true;
}
I was able to resolve by simply doing this
protected override async void OnAppearing(){base.OnAppearing();await Task.Delay(100);BreatheImageLoader.IsAnimationPlaying = false;await Task.Delay(100);BreatheImageLoader.IsAnimationPlaying = true;}
Has been try in release mode?
protected async override void OnAppearing() { base.OnAppearing(); await Task.Delay(100); imgLoader.IsAnimationPlaying = false; await Task.Delay(100); imgLoader.IsAnimationPlaying = true; }
I did the same thing and it works fine in Debug but does not work in Release.
anyone solve this problem ?
no2023年5月23日 14:25,xufeitt @.***>寫道: anyone solve this problem ?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
no@@
Any fix?
Verified this on Visual Studio Enterprise 17.7.0 Preview 2.0. Repro on Android emulator (13.0-API 33) and iOS 16.4 with below Project:
MauiApp14.zip
Screenshot:
Been watching this one since March hoping it would get fixed before my app release but doesn't look like it's been started yet. I know you guys have your hands full with others issues but this does seem like basic functionality that should get fixed. Any update on when a fix for this might go out? Thank you MAUI team.
Hi, https://gist.github.com/jamesmontemagno/7619563 If you are looking same implementation in MAUI. Please visit below GitHub link
thanks,It`s workaround for me.
@umeshkamble I got excited when I saw this but tried it out and it doesn't work for Android release builds :( GetDataAsync is only supported for ios and maccatalyst. Is there any similar method that would work for Android?
I think playing GIFs is a basic feature, but I struggled to figure it out in maui, which is ridiculous! To this day, there is still no good way to solve this problem
I think playing GIFs is a basic feature, but I struggled to figure it out in maui, which is ridiculous! To this day, there is still no good way to solve this problem
It looks like MAUI is abandoned. No one cares about basic features and performance of applications on different platforms.
The playback of GIFs is a basic function. The ticket is almost 1 year old already. When will the problem be fixed?
The playback of GIFs is a basic function. The ticket is almost 1 year old already. When will the problem be fixed?
yes from umeshkamble Gif Animation Sample
2024 is just around the corner and this issue is still not fixed. 👎🏻
I've experimented with using WebView to play a GIF in MAUI, it works on Android and iOS, on Windows I use the native support because it seems to work fine and I didn't want to troubleshoot what was going wrong with the WebView on Windows. I'm working on building out a sample, but if anyone needs something sooner let me know. What I don't have working yet is to honor HeightRequest or WidthRequest and other layout options
umeshkamble Gif Animation Sample The gif is played much too slowly.
With FFImageLoading works under iOS. Android doesn't work.
Does anyone know a Nuget alternative to ffimageloading?
How is such a basic feature still not fixed... 😆
Using WebView to animate GIF on iOS and Android https://github.com/billreiss/MauiGifWebView
When will the problem be fixed?
@billreiss : Nice Workaround for NET8.
I need a Workaround for NET7. Does anyone know a example?