Trying to import file from SD card in xamarin

57 Views Asked by At

New to Xamarin and Android, currently working my way through a program that needs to be updated to import a file from an SD Card. See below block of code.

 string path = Android.OS.Environment.ExternalStorageDirectory.Path;

            string importFile = "/storage/emulated/0/LumberData/" + "export-icsep.txt";

            if (!System.IO.File.Exists(importFile))
            {
                ShowErrorDialog("Import File not found. Please contact supervisor", null);
                return;

            }

I am trying to find out the new syntax that is being used for importing of files. Currently when debugging it fails the import and and displays the error message. Any help would be appreciated.

0

There are 0 best solutions below