Windows phone 8 get files in folder Music or Documents

前端 未结 1 2077
一向
一向 2021-01-06 18:22

I want to get files on C# downloaded from computer to default folders Document or Music on windows phone 8. How can i get them, if it possible?

相关标签:
1条回答
  • 2021-01-06 18:44

    Those two folders are available to a developer, as described in the answer on Windows Phone 8: Media file access

    Songs and pictures

    The api for songs and pictures seems to be MediaLibrary according to the "Data for Windows Phone" page on MSDN.

    It allows to add (SaveSong, SavePicture) and Delete songs and pictures from the library.

    To be able to do this, you need the Capability ID_CAP_MEDIALIB_AUDIO and ID_CAP_MEDIALIB_PHOTO set in the app's manifest.

    Documents (Windows RT only, not phone)

    The documents folder can be accessed through the StorageFolder Api as described in the File access sample

    StorageFolder storageFolder = KnownFolders.DocumentsLibrary; 
    

    Downloading files

    To download files from a computer is an entire different question and requires some more information from your end:

    • how do you want to download files from the computer
    • does the computer have a file sharing server
    • what protocol do you want to use
    • ...

    If you are going to write a program for that computer to share files to your phone, then these Windows Phone 8 Networking Samples can provide some information on how to get sockets, nfc, bluetooth or http going on windows phone 8.

    0 讨论(0)
提交回复
热议问题