Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Why does MimeTypeMap.Singleton.GetMimeTypeFromExtension for db returns null?

$
0
0

Hi,

I'm trying to change the filepicker (FilePicker-Plugin-for-Xamarin-and-Windows) intent to only show me db files, I thought that if I passed the correct mime-type it would only show me the db files.

I tried several mime-types associated with .db files (sqlite) and none worked, so I tried to get the mime type like this:

            string extension = MimeTypeMap.GetFileExtensionFromUrl(filedata.FilePath);
            string mimeType = MimeTypeMap.Singleton.GetMimeTypeFromExtension(extension);

And mimeType is set to null.

This is the code I want to change (FilePickerActivity.cs):

Am I doing something stupid?

Thanks for the help,

Luís Pinho


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>