Skip to content

Android local files (content://...) don't display correctly #26

@wiz0u

Description

@wiz0u

Files obtained via Android file picker have a Path URI of the form "content://com.android.providers.downloads.documents/document/..."
These don't display when binding this local URI to a <Image asyncImageLoader:ImageLoader.Source="{Binding ImagePath}"> or <asyncImageLoader:AdvancedImage Source="{Binding ImagePath}"/>

        var topLevel = TopLevel.GetTopLevel(this)!;
        var files = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
        {
            Title = "Select media",
        });
        if (files.Count > 0) vm.ImagePath = files[0].Path.AbsoluteUri;

The same code works fine on Desktop target (path is "file://...")

Example app attached:
AvaloniaApplicationImageAndroid.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions