WP7 how to store LiveConnectSession during TombStoning?
Asked Answered
J

1

3

I'm using the windows live sign in strategy of the PhotoSkyOnTheGo example provided by MS. So when my app starts, it shows a windows live sign in page.

During app runtime I remember the LiveConnectSession to connect to SkyDrive.

Now when the app tombstones, I need a way to save the LiveConnectSession. IsolatedStorageSettings.ApplicationSettings does not work, probably because the LiveConnectSession is not serializable (it shows some InvalidDataContractException in the debug output).

So how do I store the Session in case the app tombstones? Or is the provided PhotoSkyOnTheGo-example rubbish and I need to be able to reconnect anytime I'm accessing SkyDrive?

Jocelin answered 8/6, 2012 at 9:53 Comment(0)
E
0

If your app uses wl.offline_access scope than the live:SignInButton control saves it for you and loads it automatically. Just use the SessionChanged event to capture the session object. This way the user will need to sign in only once.

Scope: http://msdn.microsoft.com/en-us/library/live/hh243646.aspx#wlofflineaccess

Event: http://msdn.microsoft.com/en-us/library/live/microsoft.live.controls.signinbutton.sessionchanged.aspx

Explode answered 6/9, 2012 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.