Access Files in Phone memory on WP 8.1 - c#

I am developing in Windows Phone 8.1. I can use KnownFolders.RemovableDevices to access the SD card and I can further retrieve files & folders. Since some WP devices don't have SD cards, how can I access phone memory to retrieve files like the Files app Microsoft made?

The Microsoft-built file explorer app has a broader set of capabilities than are available to Windows Phone Store apps. In particular, it has full access to the documents library and unfiltered access to the SD card.

Related

Windows Phone - Get User ID

I need to store and share a user's list of favorites across a Windows Phone 8.1 Silverlight app, and a Windows 8.1 RT app. I have been using Roaming Settings up to this point, but it doesn't work for all connected devices. I have tested my app across a few devices and it syncs for most but not all devices. I have also received some user complaints about this too.
So instead I want to store a user's list of favorites in Azure Blob Storage, with the key being an anonymized user ID. But I can't seem to find any way of determining a user's ID. I have found information about DeviceUniqueId and there is ID_cap_identify_user capability in the manifest file for the Silverlight App (but not for the RT App) but I can't find any documentation on how to utilize this. Any help here would be apprciated.
PS - Does anyone have any theories as to why Roaming Settings isn't working correctly on some devices?
There is an UserInformationClass, BUT take note if you want to use it in reference to windows 10!
If you have a Windows 8 app that uses the UserInformation class, you
should migrate your app to the Universal Windows Platform (UWP) and
access the User class instead. Universal Windows Platform (UWP) apps
that access user information are now expected to declare a new
capability, uap:userAccountInformation, and call new APIs,
Windows.System.User.FindAllAsync and User.GetPropertiesAsync, to get
the data.
There is also an MSDN example on how to use it: https://code.msdn.microsoft.com/windowsapps/Account-picture-name-sample-912baff1

How can I share storage file between two apps?

I want stored some file to can use between 2 apps in windows phone 8.1 (WinRT- Universal). Like use keychaninstore in ios or write to same file in same folder in storage as Android.
How i can do this?
Thanks for all support!
There is no way share files between two Windows Phone 8.1 apps. The functionality of shared folders (for apps from the same publisher) is coming in Windows 10. The best you can do now is to use OneDrive or some other online storage.
If you mean sharing a file between the same app on Windows Phone 8.1 and Windows 8.1, then use ApplicationData.RoamingFolder.

Read the Windows Phone device memory like SD card etc

I would like to build application like File Explorer that will work on Windows Phone 8.
How to get access programmatically to device memory?
I know there is a class ExternalStorage which will allow me to read from SD card, but what about device memory (internal)?

How to upload files from the phone memory or from SD card in a Windows phone 8 application?

I have an Windows Phone app, and I need to upload file which is stored on the phone (either in the SD card or in the internal storage).
I need to build a way for the phone to browse to the file and upload to the server, which uses ASP.NET WebAPI.

How to access phone memory & search files with certain extensions in Windows Phone 8.1?

I am developing Windows Phone 8.1. I can use KnownFolders.RemovableDevices to access SD card & further can retrieve files & folders. Some WP devices don't have SD cards, then how can I access phone memory to retrieve files?
Windows 8 has CreateFileQueryWithOptions and on MSDN Windows.Storage.Search namespace says that it supports WP8.1 but it's throwing NotImplementedException. So how can I search files in WP8.1 devices?
On Windows Phone, you can have access only to KnownFolders (apart from IsolatedStorage and so on) and only after specifing the Capabilities and FileExtensions. So if you want to retrive Music files, you will use KnownFolders.MusicLibrary.
Note that KnownFolders (apart from RemovableStorage) are virtual location - it can exist both on Phone and SD card.
If you want to search for files, there is an option to use CommonFileQuery.OrderByName, but I've encountered some problems posted here.

Categories