Prism icon indicating copy to clipboard operation
Prism copied to clipboard

Single Process Model initialization

Open balazs-adam opened this issue 10 years ago • 3 comments

Hi,

I'm using the Prism.Unity framework for UWP in an application that can do background activity according the new single process model described here: link

Obviously when the app is launched in the background (the OnBackgroundActivated method is launched), none of the Prism initialization has been called (like creating the IoC container, registering services, ect.) so I did that manually by calling the CreateAndConfigureContainer method. It works great but when my app completed the background activity, the Suspending event is published so the OnSuspending method is called in PrismApplication. This method tries to access the not instantiated Navigation and SessionState services so I get a NullReferenceException. link

So my question is that, what would be the best way to initialize my app and the Prism framework when it's launched in the background?

Thanks

balazs-adam avatar Nov 20 '16 11:11 balazs-adam

Hi @senkia , thanks for bringing this to our attention. We are aware there are a number of activation scenarios we are not covering completely for UWP at this point, and want to try to get those all covered cleanly. If you could put together a small sample repro of this problem and send me a link where I can get to it I'll try to get a fix in there to cover this scenario.

Thanks Brian

briannoyes avatar Nov 20 '16 17:11 briannoyes

Closing as no sample provided when requested in 2016

brianlagunas avatar Sep 25 '18 00:09 brianlagunas

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 29 '20 01:01 lock[bot]