Я не получаю доступ к данным, хранящимся в другом приложении UWP. Я видел, что вы можете сохранить данные в LocalState
папке UWP приложения с помощью этого кода:Получить данные из другого приложения UWP
Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
Windows.Globalization.DateTimeFormatting.DateTimeFormatter formatter =
new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("longtime");
StorageFile sampleFile = await localFolder.CreateFileAsync("example.txt",
CreationCollisionOption.ReplaceExisting);
await FileIO.WriteTextAsync(sampleFile, formatter.Format(DateTime.Now));
Here is the official documentation.
Итак, с этим кодом я создаю файл example.txt в моем первом проекте UWP.
Возможно ли получить доступ к example.txt из второго проекта UWP? Если да, то как?
Спасибо большое, что это то, что я ищу! – fandro