From 1b60ac3699aadc3e3f5a3cb6136e2d49711394c7 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Thu, 18 Nov 2021 17:38:23 -0300 Subject: [PATCH] Fixed missing FavIcons on Android #1640 (#1649) * Set custom HttpClient for FFImageLoading to set AndroidClientHandler in order to load icons from icon server due to a problem with the SSL certificate when using the default HttpClientHandler #1640 * Using cleanup for FDroid #1640 * Added System.Net.Http on Android.csproj for FDroid only to check if that fixes the build --- src/Android/Android.csproj | 1 + src/Android/MainApplication.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Android/Android.csproj b/src/Android/Android.csproj index da488db56..0c2c1be45 100644 --- a/src/Android/Android.csproj +++ b/src/Android/Android.csproj @@ -68,6 +68,7 @@ + diff --git a/src/Android/MainApplication.cs b/src/Android/MainApplication.cs index b0c825656..32067c546 100644 --- a/src/Android/MainApplication.cs +++ b/src/Android/MainApplication.cs @@ -16,6 +16,8 @@ using Bit.Droid.Utilities; using Plugin.CurrentActivity; using Plugin.Fingerprint; using Xamarin.Android.Net; +using System.Net.Http; +using System.Net; #if !FDROID using Android.Gms.Security; #endif @@ -78,7 +80,8 @@ namespace Bit.Droid FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration { FadeAnimationEnabled = false, - FadeAnimationForCachedImages = false + FadeAnimationForCachedImages = false, + HttpClient = new HttpClient(new AndroidClientHandler() { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }) }); ZXing.Net.Mobile.Forms.Android.Platform.Init(); });