We are developing a WP8 Direct3D C++ native app, and we need to determine the launch URI or launchapp parameters because they determine some actions that the app needs to perform on startup. The use case for this is when tapping an NFC tag containing the URI that'd launch the app, but it could be used also when clicking on a link with the URI. The problem is, that we cannot get access to the launch URI or the launchapp parameters from the native Direct3D app, and I'm starting to wonder whether that is even possible, so I'm asking for some guidance on this issue. In short, these are the alternatives that we explored, we'd need access to either of the following:
- The launchapp parameters when using a LaunchApp message in an NFC tag for launching the app. We'd need that to process the message encoded in the NFC tag. Apparently one could access those through the OnNavigatedTo event handler in a XAML app, as explained below:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
string parameter = string.Empty;
if (NavigationContext.QueryString.TryGetValue("ms_nfp_launchargs", out parameter))
MessageBox.Show("NFC Paramaters : "+ parameter);
But that does not seem to be available to native Direct3D apps.
- The URI when launching the app through a URI association. We would usually try to access the URI like so:
void App::OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs^ args)
if (args->Kind == Windows::ApplicationModel::Activation::ActivationKind::Protocol)
Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ eventArgs =
// TODO: Handle URI activation
// The received URI is eventArgs->Uri->RawUri
Except that the ActivationKind::Protocol does not seem to be supported in Windows Phone. Our app gets launched, but we cannot get the ProtocolActivatedEventArgs. It seems that one needs to use a UriMapper derived class in order to get access to the URI in WP8, but that is not available in C++ as far as I know.
Any help with this issue would be greatly appreciated.