Reputation: 668
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
Reputation: 3923
To Access App Data, You need Device Portal first. Below are the instructions from MSDN.
Type the IP address displayed below the Device Portal options into your favorite web browser.
Make sure you’ve got an app sideloaded (or sideload one now using the “Apps” page).
See This Link for Full info as to how to access App Data
Upvotes: 2
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