1

I try to develop several WP8 apps using the same credentials for all(same user and password).So if the user choose to change his credentials he does only once in one app and it will change for all. Until now i used Isolatedstorage to save the credentials(as shown below) but im wondering if the files would be accessible by all the apps...i guess they would not. So what solution do you have ?

thanks for your help

   public static void SaveToFile(byte[] Encryptedfile, string FileName)
    {
        using (var SaveApplicationFile = IsolatedStorageFile.GetUserStoreForApplication())
        {
            SaveApplicationFile.DeleteFile(FileName);
            using (IsolatedStorageFileStream fileAsStream = new IsolatedStorageFileStream(FileName, System.IO.FileMode.Create, FileAccess.Write, SaveApplicationFile))
            {
                using (Stream writer = new StreamWriter(fileAsStream).BaseStream)
                {
                    writer.Write(Encryptedfile, 0, Encryptedfile.Length);
                }

            }
        }
    }
Paul Martinez
  • 562
  • 1
  • 9
  • 19

1 Answers1

0

You can't access IsolatedStorage of other App.
Nor you can't save on SD card.
Maybe consider using Skydrive or other exteral storage.
Another idea, I'm thinking about - maybe you can use MediaLibrary and Save Picture there. And use this picture as a container for some data - maybe using Steganography ;)

Romasz
  • 29,662
  • 13
  • 79
  • 154
  • thanks for ur answer even if it doesn't help me much...I found this (http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402541(v=vs.105).aspx#BKMK_Installationfolder) but it seems there is no way to save in a shared depository on the phone...Anyone could help ? BTW i can't use an external Storage... – Paul Martinez Jan 03 '14 at 16:47
  • You are right, for now there is no shared depository. Probably using network (SkyDrive, own server or something) is the only choice. – Romasz Jan 03 '14 at 16:56
  • 1
    In fact, i could use an other app to manage my credentials. His role will be to save in his Storage the password and Id of the user. Each time the user need to set or change a password in one app, this specific app will be launched. What do you think ? thanks (btw i still don't know how to do this) – Paul Martinez Jan 06 '14 at 09:22
  • @PaulMartinez And that's a very good idea, you can do it by Uri associations (only WP8): http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206987(v=vs.105).aspx, http://stackoverflow.com/questions/13496119/launch-another-app-from-wp7 and you can easily find more examples. – Romasz Jan 06 '14 at 09:44
  • I found something more interesting and more simple for user: KnowFolders http://msdn.microsoft.com/en-US/library/windows/apps/windows.storage.knownfolders So there are common folders on WP8 !! :) it's called Librairies on this topic http://stackoverflow.com/questions/18463165/read-from-internal-storage-in-windows-phone-8 – Paul Martinez Jan 06 '14 at 09:47
  • @PaulMartinez Yeah, that is what I meant by saving common picture - you have only access to Pictures and Videos, Documents are not implemented for WP8 yet. http://stackoverflow.com/questions/14695930/windows-phone-8-get-files-in-folder-music-or-documents http://social.msdn.microsoft.com/Forums/wpapps/en-us/14e011fd-9364-4102-bf39-c3e5f4cb4b1a/windows-phone-8-documents-directory?forum=wpdevelop. Maybe you can disguise some data as jpg file, but I do not know if that will work. – Romasz Jan 06 '14 at 09:55
  • So to summary i got 3 solutions ...save on an external server, save in Pictures, create a new app which manage the credentials...Why could they not create a local and common storage for all apps...?! Thanks for ur help ;) – Paul Martinez Jan 06 '14 at 10:23