Loreno
Loreno

Reputation: 668

How to access Windows.Storage.ApplicationData.Current.LocalFolder on a Windows Mobile device?

During my app's runtime, I'm saving some data in txt file to location: Windows.Storage.ApplicationData.Current.LocalFolder On Windows 10 PC, I can easile read this file in C:\Users\marcin\AppData\Local\Packages[app id]\LocalState\ How can I access this file, when I run the app on a phone? When I connect my device to a PC, I don't see an option to access AppData folder.

Upvotes: 1

Views: 1728

Answers (2)

AVK
AVK

Reputation: 3923

To Access App Data, You need Device Portal first. Below are the instructions from MSDN.

  1. Head to the Settings App > Updates and Security > For Developers, and enable Developer Mode and Device Portal.
  2. Type the IP address displayed below the Device Portal options into your favorite web browser.

    • Make sure you’re on the same network, otherwise your browser won’t be able to find your phone.
    • You’ll also need to authenticate yourself with the device.
  3. Make sure you’ve got an app sideloaded (or sideload one now using the “Apps” page).

  4. Click on “File Explorer” to see the tool above.

See This Link for Full info as to how to access App Data

Upvotes: 2

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21899

Assuming you've side-loaded the app you can access it via the Device Portal.

To access the device from a PC enable the Device Portal in the "For Developers" section in Settings. Connect the device to the PC via USB and navigate to the device portal in the browser at http://127.0.0.1:10080 

See Device Portal for Mobile and Windows Device Portal overview on MSDN for more details.

If you've deployed through the store then there is no external way to access the app's data. The easiest would be to save it in the RoamingFolder instead of the LocalFolder and then read the data from the PC side. Another option would be to provide a sharing feature in the app to share the log file via email, etc.

Upvotes: 2

Related Questions