Discussion Board

Results 1 to 4 of 4
  1. #1
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    2

    Accessing the launch URI / launchapp parameters from a native C++ Direct3D app

    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)
    {
    base.OnNavigatedTo(e);
    string parameter = string.Empty;

    if (NavigationContext.QueryString.TryGetValue("ms_nfp_launchargs", out parameter))
    {
    MessageBox.Show("NFC Paramaters : "+ parameter);
    NavigationContext.QueryString.Remove("ms_nfp_launchargs");
    }
    }

    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 =
    dynamic_cast<Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^>(args);

    // 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.

  2. #2
    Registered User
    Join Date
    Jul 2014
    Posts
    2

    Re: Accessing the launch URI / launchapp parameters from a native C++ Direct3D app

    Hi,

    Has there been any development on this?

    It seems is not available

    I am not sure how to fix this issue

    Thanks

  3. #3
    Regular Contributor
    Join Date
    Oct 2013
    Location
    Pennsauken, NJ, USA
    Posts
    124

    Re: Accessing the launch URI / launchapp parameters from a native C++ Direct3D app

    I can't help you with this directly, but have you tried a Universal app? My WP8.1 winRT c++/directx app contains the ActivationKind::Protocol enum. I only ask because I see your last post was before WP8.1 was released...

  4. #4
    Registered User
    Join Date
    Jul 2014
    Posts
    2

    Re: Accessing the launch URI / launchapp parameters from a native C++ Direct3D app

    I haven't as yet tried a universal app as i was hoping to avoid having to do this

    It is looking more and more like this is the only way to go however, as so much functionality is simply missing from the native project

Similar Threads

  1. How to convert a pure WP8 Direct3D app into a Direct3D and XAML one
    By 風の音 in forum Windows Phone General
    Replies: 1
    Last Post: 2013-07-04, 08:42
  2. Accessing Camera in Windows Phone Direct3d App
    By Shayan Rais in forum Windows Phone General
    Replies: 6
    Last Post: 2013-03-06, 19:13
  3. Pass Parameters to native exe application
    By mrudulpen in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2008-05-05, 09:43
  4. Launch a file with parameters
    By j2k in forum Symbian
    Replies: 0
    Last Post: 2003-04-16, 22:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×