This project is read-only.

Fast App Resume and Fast App Switching Recommendations

Topics: Windows Phone 8
Feb 28, 2014 at 2:30 PM
Edited Feb 28, 2014 at 2:38 PM
Sorry for the elementary question. I want to implement FAS and FAR on Windows Phone 8 with my media player. What is the recommended approach to ensure playback resumes from the last played point and can cope with all FAS, FAR and tombstoning scenarios?

Is it as simple as saving the media state (mediaplayer.GetMediaState) to an invar in OnNavigatedFrom and restoring it in On.NavigatedTo?
Mar 1, 2014 at 2:04 AM
Here is some code to help serve as an example of how to handle this.
Mar 3, 2014 at 8:13 AM
Thanks Tim, this is really help. Will let you know how I get on today. Cheers Dave.
Mar 3, 2014 at 4:04 PM
Tim, is it correct/best practice to unload all plugins in the NavigatedFrom and load them again in the NavigatedTo?
Mar 4, 2014 at 11:38 AM
On further investigation it looks like I end up with multiple instances of my player page when navigating away from and then coming back to the player. I think this might be related to the same issue here:

I guess my question is, what is the recommended way to clean up when navigating from a page to ensure all Plugins/resources are released and the instance garbage collected?

Thanks in advance,

Mar 4, 2014 at 3:25 PM
Hi Dave,

Indeed you can see that you get multiple instances of the player when you navigate to and from multiple times to a page with a player on it.

See my post here and test program that shows the memory bug. I have not been able to solve this memory leak, have been able to minimize it a bit so at least the page gets destroyed, but the player remains in memory