skip to Main Content

I am creating social application in Xamarin.Forms where I want to implement media downloader to download image and video. currently I am using Xamarin.FFImageLoading.Transformations nuget to load image.
how to create Whatsapp UI using xamarin forms for android and iOS?

I want to implement manual media download functionality with progress shown in images thumbnail like whatsapp, telegram mobile app.

var cachedImage = new CachedImage() {
    HorizontalOptions = LayoutOptions.Center,
    VerticalOptions = LayoutOptions.Center,
    WidthRequest = 300,
    HeightRequest = 300,
    CacheDuration = TimeSpan.FromDays(30),
    DownsampleToViewSize = true,
    RetryCount = 0,
    RetryDelay = 250,
    TransparencyEnabled = false,
    LoadingPlaceholder = "loading.png",
    ErrorPlaceholder = "error.png",
    Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg"
};

https://github.com/luberda-molinet/FFImageLoading
enter image description here
enter image description here
enter image description here

suggest any approach to achieve above functionality in Xamarin.Forms or Xamarin.Android or Xamarin.iOS.

4

Answers


  1. Chosen as BEST ANSWER

    Found to create UI like Whats app and functionality using Xamarin Forms check below link https://github.com/egbakou/WhatsAppUI

    and below link is for some good looking UI in Xamarin Forms for android and iOS

    https://github.com/jsuarezruiz/xamarin-forms-goodlooking-UI


  2. If you want a true progress bar, you will likely need to take over the image download yourself and build a custom control. You may be able to extend or modify CachedImage, but not sure if they provide hooks into their stream downloader (which you would want to replace with one that reports progress).

    Another option would be to just show a nice animation with something like this https://github.com/DanielCauser/XamarinFFImageLoadingAndLottie

    Login or Signup to reply.
  3. @Sumeet what I understood is as below please correct me if I am wrong :-

    There would be 4 options to app user as below :

    1. If user selects auto download option…
      Media in the app would get downloaded automatically when we open app, or in the background the media could get downloaded.

    2. If user select download over WiFi option from user settings
      Media would get downloaded once user gets connected to WiFi.

    3. If user selects download media manually option from settings
      App media should only get downloaded once user select particular media for download
    4. If user selects do not download option
      User will not be allowed to download the media contents in the app.
    Login or Signup to reply.
  4. For file downloading using Xamarin Forms there is a nice article by Damien Aicheh :

    https://damienaicheh.github.io/xamarin/xamarin.forms/2018/07/10/download-a-file-with-progress-bar-in-xamarin-forms-en.html

    For circular progress dialog you can refer this article by James Montemagno :
    https://blog.xamarin.com/using-custom-controls-in-xamarin-forms-on-android/

    You need to create your custom xaml where you place your loader on top of a view and update the UI based on the file downloaded progress.

    Hope this helps!!!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search