How to handle window.open on Xamarin.Forms HybridWebViewRenderer on IOS - xamarin.ios

I have a iOS "app" which is a Xamarin.Forms application which has a HybridWebView for the main functionality and the corresponding HybridWebViewRenderer in the iOS project. Part of the functionality is for some links to open in a new window, and this is done using window.open.
However when these links are clicked nothing happens. How does the UIWebView handle javascript calls to window.open?
The simplest acceptable solution is to make these links open in the Safari (or default) browser.
So how can I force window.open to open in the default native browser?

Related

using chrome.windows.create() to launch a window in PWA mode

I'd like to use my chrome extension to create and manage the focus for windows in my Progressive Web App. Focusing windows works well, but whenever I try to create a new window using chrome.windows.create(), the url loads into a new web browser window and not within the PWA. Is there a way to get chrome to recognize that a url within that scope should always load within the PWA?
My app requires allowing the user to micromanage their window focus to keep their workflow fast, and unfortunately vanilla .open() and .focus() have loads of limitations within chrome.

how to make embedded web page scrollable in android webview?

android Webview loads a remote web page that embeds another web page as object data value.
I want to make the page open in object scroll.
But no suggestion so far on net could help me

How to open new browser instance with specified size and position

From the command line, or from an application, I want to open a NEW browser instance with a specified size and position, and pointed to a specific URL. I want to open a browser that acts like a dialog box. Ideally, I'd like to be able to disable "decorations" (like tabs, bookmarks, etc.). I do not want to open a new tab or pop-up window from an existing browser instance.
I know Electron or Node Webkit do this, but I just want to open a browser as that acts as a GUI front end for whatever back end I'm building.
I'd be happy if it would work for a specific browser; say, Chrome, or Chromium.
So, for instance, a Python app (or C/C++, Java, etc.) could start it's web server, then open a browser of the proper size, pointed to "localhost:xxxx/whatever.html", and serve up data via AJAX.
Kind of a universal single page app front end...
UPDATE (SOLUTION?)
The answer seems to be in two parts: 1) Opening the browser with command line switches, and 2) Resizing the window in JavaScript.
Using chromium (or Chrome), on the command line:
chromium-browser --new-window --app=http://192.168.1.80:8080/index.html
Then, within your JavaScript:
window.resizeTo(800,500)
This will bring up a new window and resize it.
This is great. Now, I can make an app in any language that allows me to open a web server. The user interface is done in HTML, CSS, and JavaScript. The browser is opened from within the application using the proper command line switches.
Electron does simply open up one or multiple browser windows, you can set them to any url via BrowserWindow.loadURL(url) this could be https://google.com https://localhost:1337 (Your backend webserver) or a local HTML file. The BrowserWindow can be created with information such as size and position.
The only alternative would be something like Qt HTML5 applications that use Qt WebEngine, but this does basically the same thing since Electron and Qt WebEngine use chromium.
Also, there is no point in a single page app that runs without JavaScript.

What is the URL option to display a Mobile XPage App with iPhone theme?

When I load an xpages mobile application into desktop safari it displays the app with the default theming for an Android device. What do you need to do to get it to use the default iPhone theming?
I thought you needed add something like &iPhone=1 to the end of the url, but that's not working.
Thank you.
To quote the Mobile Controls tutorial:
A browser platform query string parameter is available for developers
to force the browser to takes precedence over one another. Just add
'?platform=iphone' or '?platform=android' to the URL and this will
force the correct theme for XPages mobile pages that match against the
xsp.theme.mobile.pagePrefix property.
Another option is to enable the Develop menu (Edit - Preferences, then on Advanced tab tick Show Develop menu in menu bar. Then from the Develop menu you can change the user agent or set your own.
You could use the sample application for the Extension Library from openntf.org. Go to the "Mobile" tab where you can "extract" the urls to show as iPhone, Android and BlackBerry.
With just a few changes you can add a url as a parameter to this application to show your own mobile app in the same context ;-) I use that for demo purposes.
/John

JavaFx 2.0 WebEngine component's Popup Handler not opening a new window for Skype button, also not connecting to skype for a phone call

I need to create a popup handler that opens an external window. How can I do this? The default opens the popup in the same webview, and there is no code in the JavaFx learning trail to provide me a general idea or anything. The origin of the popup request comes from a skype button widget. When the user clicks the widget a new "window" (stage) needs to open and the popup must be included within the new stage. The stage is just a composition of a Webview and its engine.
This should happen if the user does not have skype. If the user has skype then skype should open and connect the phone call. Neither is happening.
Update: I also asked in the JavaFx 2.0 forum and got an answer. Here it is. (I'll move it to the Answer area as soon as I can):
https://forums.oracle.com/forums/thread.jspa?threadID=2323123&tstart=0
It still wont open skype and connect for a phone call or open a popup to install skype.
Although the Javascript widget does open skype and connects for a phone call if I open the widget inside a browser in standalone mode.
Therefore it is an issue with the JavaFx 2.0 web app.
Any help is greatly appreciated.
AFAIK, to make calls from the browser Skype needs plugin named "Click to Call" to be installed into the browser.
But there is no such plugin for JavaFX WebView, so you can't have Skype "click-to-call" functionality inside webview.

Resources