I was having a look at the startup path for the FileOpenPicker (which is a hosted view the same as for the ContactPicker) and things get a bit more complicated here. As you have noted, the bootstrapper only picks up activation events from the application's
main CoreApplicationView, whilst the pickers create a dedicated view and raise the activation events there. For the moment the best approach is to use the OnXxxActivated(...) method of the App,cs file as you have found.
The second issue is that the Okra NavigationManager (which normally handles creation of views & view-models) is a singleton and dedicated to the main application view. I am aiming to add support for multiple navigation stacks, but this will be a
Is there a requirement for any form of navigation within your contact picker, or is it a single page with a GridView? If it is the latter then you should be able to wire everything up by hand in the Application.OnActivated() method rather than rely on Okra.
protected override OnActivated(IActivatedEventArgs args)
if (args.Kind == ...)
MyView view = new MyView();
MyViewModel vm = new MyViewModel();
view.DataContext = vm;
Window.Current.Content = view;
Obviously insert the relevant ActivationKind as required. Unfortunately you don't get the extra Okra injected events etc., but for simple cases should work. You also don't get the MEF composition either so if you are relying on that then you need
to get MEF to compose the view/view-model rather than using the constructor. Ultimately I'd like to get this into the Okra App Framework as a supported activation type, but for the moment the manual workaround is best.