locked
Prompting Browser From Application RRS feed

  • Question

  • Hi all,

    I am trying to create an application which uses my site search for pages and enabling users to open the results in a browser window.

    I wanted to know if this is possible, and if so how?

    Additionaly, are there any other good solutions? iFrames?

    Thanks,

    Sunday, October 21, 2012 7:39 PM

Answers

  • The launcher object is used to open a URI - whatever default app is configured to handle that protocol will be launched.  If none is set, then the user will be prompted to choose which application handles it by default.  This is the only way to open/launch another application or file/URI that your app does not directly support.

    So, for the first one - use the right URI and then use the launcher to open it should cause the right app to open (e.g. if the bing application is configured to handle the protocol you used in the URI, it will be launched, etc.).

    For the second item, simply put an iFrame in your app and target that with whatever external site you want.  For more details and samples of this, see http://msdn.microsoft.com/en-us/library/windows/apps/Hh780594.aspx.

    • Marked as answer by Song Tian Friday, November 9, 2012 6:21 AM
    Monday, October 22, 2012 6:22 PM

All replies

  • An iFrame is the only way you can show your web site page in your app directly (instead of in the browser).  To show your results, simply use the launcher API and let the user's default choice handle it, see http://msdn.microsoft.com/en-us/library/windows/apps/br241801.aspx for more details on that front.
    Monday, October 22, 2012 12:12 AM
  • Hi Gearard, 

    Thanks for you answer, but i am am not so sure what is this launcher object? what is its purpose when launching URI's? will it open a new browser window?

    I am looking to investigate both options:

    1) Opening a browser window - like the bing application

    2) Opening an iFrame inside the application.

    but i am still not sure how can I make it happen.

    Thanks,

    Monday, October 22, 2012 7:04 AM
  • The launcher object is used to open a URI - whatever default app is configured to handle that protocol will be launched.  If none is set, then the user will be prompted to choose which application handles it by default.  This is the only way to open/launch another application or file/URI that your app does not directly support.

    So, for the first one - use the right URI and then use the launcher to open it should cause the right app to open (e.g. if the bing application is configured to handle the protocol you used in the URI, it will be launched, etc.).

    For the second item, simply put an iFrame in your app and target that with whatever external site you want.  For more details and samples of this, see http://msdn.microsoft.com/en-us/library/windows/apps/Hh780594.aspx.

    • Marked as answer by Song Tian Friday, November 9, 2012 6:21 AM
    Monday, October 22, 2012 6:22 PM