Is there a way to open a link in IE (non-metro mode) from my metro app programmatically?
For metro applications users are in control of the applications that launch for uri and files.
To browse to a webpage (JavaScript but the C# is similar):
var uri = new Windows.Foundation.Uri("http://www.microsoft.com");
Windows.System.Launcher.launchUriAsync(uri).then(function () { });
To launch other apps you should look at the Windows.System.Launcher class.
Related
I am working on cordova windows app .After login page submit, there will be an authentication web service, which will redirect to one particular url in my application.
But in my app, after login submit, the redirected page is opening in internet explorer instead of opening in application view itself. The redirected cross domain url is not opening in application view. But it opens internet explorer and opening the page. It should not happen like this.
Since it is opening in internet explorer browser ,instead opening in application view,login is not successfully happening.
Could any one help me on this issue ?
We are using windows 8.1 and cordova version 5.3.0 .
The same problem I faced in android app also .But after I added allow -navigation tag in config.xml (This is part of whitelist cordova plugin), The redirected page opened correctly in application view itself. But cordova white list plugin not supporting windows cordova app.
Install this plugin cordova-plugin-inappbrowser.
When successfully installed, your code should look kinda like this.
Code example:
<button id="login">Log in</button>
var btn = document.getElementById("login").addEventListener("click", login, false);
function login() {
var ref = cordova.InAppBrowser.open(
'link_to_the_website',
'_system',
'location=yes');
}
You have three type of options to load the URL.
_self: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
_blank: Opens in the InAppBrowser.
_system: Opens in the system's web browser.
I do have a Kendo UI Mobile app which I created with the VS Icenium extension. My question is if it is possible to open remote pdf documents with the native pdf viewer which is installed on a mobile device.
Currently, I'm using this code in order to open a document:
if (device.platform === "Android")
window.open(data.uri, '_blank');
}
else
window.open(data.uri, '_system');
}
This opens the browser and downloads the file, which is retrieved from a wep.api .NET MVC webservice. On iOS it works quite well. But on Android it opens the browser and starts the file download in the background and the document is not opened in the browser. It is necessary to pull down the message center in order to open the file.
But like I said, it would be great if I could check if a pdf viewer is installed on iOS / Android and ask the user to open the document with it otherwise opening the file in the browser using the code from above.
Searching the internet the only option I was able to find was pdf.js (which I wasn't able to implement into my app).
I'm an absolute beginner with HTML5, jquery, Kendo UI Mobile etc. and it would be great if you guys could give me your help!
Thank you in advance!
Regards,
Martin
I am building an app in Phonegap for windows phone 7, iOS and android using JQuery mobile. The app was rejected by Microsoft because when it links to an external page to donate to a charity, the URL bar is not visible when the user goes to this external page to show the user that HTTPS is being used. Is there a way to show the URL bar in the external page or to maybe force the link to open in Internet explorer.
Have you tried to use
target="_blank"
for external ulr?
Alternatively you can use the ChildBrowser Plugin.
How can I navigate from a windows phone 7 app to (or point to) a pdf file which is hosted in web server. I want to open the pdf file in the pdf viewer for WP7 app (I believe the current IE for WP7 would not be able to open a pdf file).
Something like
HuperLinkButton.NavigateUri = "http://mypdfserver/a1.pdf"
would work?
You should be able to raise a WebBrowser Task & point to the PDF URI. IE is then going to ask the user to download the Adobe Reader if they do not have it installed. Something like this:
WebBrowserTask browseToPDF = new WebBrowserTask();
browseToPDF.URL = "<server-URI><FileName>.pdf";
browseToPDF.Show();
Hope this helps!
Is there a way to open the Windows Phone 7 marketplace from a page being viewed in the mobile browser.
In an WP7 app I can do this:
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = "3cc99ca6-f0e6-df11-a844-00237de2db9e";
marketplaceDetailTask.Show();
On the desktop I can do this in a web page:
http://social.zune.net/redirect?type=phoneApp&id=3cc99ca6-f0e6-df11-a844-00237de2db9e
Is there a way to do this from a web page in the mobile browser?
The URL format to launch Marketplace on the phone when a user clicks on a URL is:
zune://navigate/?appID={app guid}
So for your app that would be:
zune://navigate/?appID=3cc99ca6-f0e6-df11-a844-00237de2db9e
If you want this hyperlinked in the browser simply wrap with a href tag.
Download Marketplace Search
The browser on Windows Phone 7 emulator doesn't support direct (type -> navigate) application navigation. What Omar is showing won't work if you type it up in the emulator because there are internal restrictions as to what protocols can called directly, and zune is not one of the supported protocols.
It will, however, work from the email application and the browser as a link.
The rules for marketplace links changed and the zune:// links are no longer valid.
The proper format for the deep link is:
http://windowsphone.com/s?appid=the_app_id
The appid is the guid assigned to your app and can be found on the details screen for your app in the app hub.
The advantage of this format is that it is a direct link to the app in the user's localized marketplace.
On a Windows Phone, this link opens the web browser, which immediately launches the marketplace app.