locked
[UWP]Windows 10 Universal app development app development RRS feed

  • Question

  • i am writing universal app for all windows 10 device (mobile ,laptop,surface,tablet).how can i check that sd card is inserted in my device or not .and how can i access data of sd card.
    Wednesday, May 4, 2016 12:46 PM

Answers

  • Access to SD card from UWP app is detailed in the following online documentation : https://msdn.microsoft.com/en-us/windows/uwp/files/access-the-sd-card

    // Get the logical root folder for all external storage devices.
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;            
    
    // Get the first child folder, which represents the SD card.            
    StorageFolder sdCard = (await)externalDevices.GetFoldersAsync()).FirstOrDefault();

    If sdCard is not null, then a SD Card is present
    • Proposed as answer by Krunal Parekh Thursday, May 5, 2016 2:52 AM
    • Marked as answer by Krunal Parekh Thursday, May 19, 2016 9:42 AM
    Wednesday, May 4, 2016 1:36 PM