question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not load cache when network is disconnected

See original GitHub issue

I use a URL as the image source. First, I load the image with good netwok. The image can be shown well. Then I disconnect the network and restart App, the ImageView show Error placeholder.

The first time I load the image, it should have been cached. But why it can’t be shown when the network is disconnect?

I use the FFImageLoading for Xamarin Forms package from Nuget, version is v2.1.8.

Xamarin Studio Community Version 6.1.1 (build 15) Xamarin.Android Version: 7.0.1.3 (Xamarin Studio Community)

Any help please… Thanks.

I test it with a simple project, only have a Page.

App.xaml.cs

using Xamarin.Forms;

namespace FFImageLoadingTest
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            MainPage = new FFImageLoadingTestPage();
        }

        protected override void OnStart()
        {
            // Handle when your app starts
        }

        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}

FFImageLoadingTestPage.xaml

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:FFImageLoadingTest" x:Class="FFImageLoadingTest.FFImageLoadingTestPage" xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
    Title="Basic XAML Example">

    <ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center"
            WidthRequest="300" HeightRequest="300"
            DownsampleToViewSize="true"
            Source = "http://a.hiphotos.baidu.com/zhidao/pic/item/f9dcd100baa1cd11aa2ca018bf12c8fcc3ce2d74.jpg">
        </ffimageloading:CachedImage>
</ContentPage>

FFImageLoadingTestPage.xaml.cs

using Xamarin.Forms;

namespace FFImageLoadingTest
{
    public partial class FFImageLoadingTestPage : ContentPage
    {
        public FFImageLoadingTestPage()
        {
            InitializeComponent();
        }
    }
}

I am a novice in Xamarin. If I use FFImageLoading with a wrong method?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
daniel-luberdacommented, Oct 19, 2016

There’s a new prerelease coming today or tommorow with completely redesigned core (refactored code). I’ll write more details soon.

0reactions
daniel-luberdacommented, Oct 28, 2016

@AllenMeex @owlstack

Yes, the new version which is now released as a prerelease should solve those issues. Could you try it? Please reopen if you still experience it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Load Cache in Android Webview when not connected to ...
I have this app which uses webview to render the cached content when it is in offline mode and shows the webpage from...
Read more >
Are You Offline? What to Do When a Website Won't Load
Can 't seem to get a specific website to load? Here's everything you can try to figure out the problem and hopefully get...
Read more >
Issue 467457: HTML5 Application Cache Not working ...
On my computer Win 8.1 the appcache keeps downloading every time I reload the page and when I go offline the page does...
Read more >
Bug - Remote config Cache is working only the first time ...
Load it once with the Internet ON and it works => It gets the last remote value; Disconnect the Internet and stop the...
Read more >
Turn on Cached Exchange Mode
You cannot use Cached Exchange Mode with a POP or IMAP account. If Outlook is stuck in Offline mode, see Work offline in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found