{"id":870,"date":"2018-03-26T11:34:31","date_gmt":"2018-03-26T11:34:31","guid":{"rendered":"http:\/\/www.netexl.com\/blog\/?p=870"},"modified":"2018-03-26T11:34:31","modified_gmt":"2018-03-26T11:34:31","slug":"launch-external-url-in-browser-from-windows-store-app","status":"publish","type":"post","link":"https:\/\/www.netexl.com\/blog\/launch-external-url-in-browser-from-windows-store-app\/","title":{"rendered":"Launch External Url in Browser from Windows Store App"},"content":{"rendered":"<p>The java script code for achieving this:<\/p>\n<pre class=\"lang:default decode:true \">\/\/ Create a Uri object from a URI string \r\nvar uri = new Windows.Foundation.Uri(\"http:\/\/test.com\");\r\nvar options = new Windows.System.LauncherOptions();\r\n\/\/ Launch the URI with a warning prompt\r\noptions.treatAsUntrusted = true;\r\n\/\/ Launch the URI\r\nWindows.System.Launcher.launchUriAsync(uri, options).then(\r\nfunction (success) {\r\n       if (success) {\r\n           \/\/ URI launched\r\n       } else {\r\n           \/\/ URI launch failed\r\n       }\r\n});\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The java script code for achieving this: \/\/ Create a Uri object from a URI string var uri = new Windows.Foundation.Uri(&#8220;http:\/\/test.com&#8221;); var options = new Windows.System.LauncherOptions(); \/\/ Launch the URI with a warning prompt options.treatAsUntrusted = true; \/\/ Launch the URI Windows.System.Launcher.launchUriAsync(uri, options).then( function (success) { if (success) { \/\/ URI launched } else { \/\/ URI launch failed } }); &nbsp;<\/p>\n","protected":false},"author":5,"featured_media":746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,24,21],"tags":[],"class_list":["post-870","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net","category-javascript","category-windows-store-app"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/870","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/comments?post=870"}],"version-history":[{"count":1,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/870\/revisions"}],"predecessor-version":[{"id":871,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/870\/revisions\/871"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media\/746"}],"wp:attachment":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media?parent=870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/categories?post=870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/tags?post=870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}