Recommended way to embed Google Drive inside a WebView? - objective-c

I have embedded a Google Drive webpage inside a webView in Mac OS X, but in this case the webpage is not fully functional:
It's not possible to Drag & Drop a file from the filesystem inside a document, (while it's possible to drop an image from another application)
The "Share" button does not work
The Print Button does not work
Multiple entries for the same user appear into the chat when opening the same document various times. The expected behavior is that the number of entries decrease when the user close the page. When a document is shown inside a Mac OS X WebView, the number of entries is increased correctly when opening a page, but it do not decrease when the WebView is closed.
I want to understand what is the recommended way to embed a Google Drive page inside a WebView to avoid all these issues.
Additionals information:
WebView documentation
All the requests are authenticated using the Google Drive Oauth access token.

There is no current recommended way of doing this, it should just work as if you are viewing Google Drive in any browser. Authorization should be done by the cookie though, Oauth token won't help you here.

Related

Zoom URL-schema and deep link format for zoomus links

I'm developing web application which uses Zoom API. In this application users are to be able to go to the specific Zoom meeting. Currently, we are using HTTPS-based links but Zoom provides very low-quality user experience with whose links. How to redirect users to zoomus:// meetings? I found Zoom Documentation such links exist. And found no information about format of those links.
So, the questions I have:
What is the format of zoomus:// URL-schema links
What is the format of Zoom deep links
Is there any API which allows to get a direct Zoom app link for a meeting.
When going via an HTTPS link the web browser then opens a zoommtg:// link which opens the Zoom app. I've not found any documentation for the schema, but looking at the URLs they're of the form:
zoommtg://zoom.us/join?action=join&confno=<number>&pwd=<password>

Can I create a Whitelist for Safari using OpenUrl in Xamarin.Forms?

I am working on a project using Xamarin.Forms as a container app. This app includes several webviews that link to restricted web content. One of these links our Sharepoint site. The Sharepoint site has a link that allows our users to go to a 3rd party site(Cornerstone) to view training videos. When using the stock UIWebView, WKWebView, or SFSafariViewController the popup that displays the video is not shown. The only way that I can get this video to play in my app is to use OpenURL to open the Sharepoint site in Safari. The problem is that this is an Enterprise solution where we don't want to allow the employees free reign with the browser.
Is there a way to create a whitelist or to have some control over the searchbar or read the url that they are linking to and block it or redirect the user?
Unfortunately as it's farming out the URL Navigation external to your application there's not a lot you can do from within your app to restrict what they do after the fact, 'openURL' only returns a Boolean value as to it's success, and the only parameters that you can send to it are:
application - Reference to this application
(UIApplication.SharedApplication).
url - The NSUrl specified by the
calling application.
sourceApplication - The bundle ID of the calling
application.
annotation -Optional property-list data passed by the
calling application.
You can only access these if you override the 'openURL' method within your 'AppDelegate.cs' class, there is a set of options you can pass through as an override but again none of those allow you to restrict what the user does after the browser has opened.
If the devices are managed using something like 'meraki' or some other software to control the use of managed devices, then you would likely set up a 'group policy' styled set of restrictions however that's not really a Xamarin issue, and should be discussed with the network administrators.
That being said, I don't see any reason why you can't use the WebView1, that way you can handle it all within your application. Or alternative utilize custom renderers and pass in the direct video urls and commit to opening up the devices media player for streaming the content2.
1 Playing videos in WebView
2 Using the media manager plugin.

Bing Maps in Windows 8 app

My question is similar to this one "https://bitly.com/UaQOC4", but that question is somewhat misleading.
In my Windows 8 Store app, I have a Bing map reference to a particular location somewhere in South Africa. The referenced location will have multiple pins to denote key areas of interest to users of the application, with an info window for each of the pins.
When a user clicks on a pin, the info window will give them more information, like statistics around the location and a link to a page within the application, for example: /pages/nests/crowsnest.html.
What I need is to be able to push the user, when clicked on the location in the info window, to this page, however, this does not seem to be allowed.
From my understanding, we're trying to force a page load from within the current domain space (our application) from outside of the application scope (info window == iframe) as this is not a web page, this seems to be disallowed.
Is my assumption correct in that we're trying to break the domain policy here? I don't see how we can, as we're just redirecting users to a page.
I have tried the WinJS.Navigation.navigate("/pages/nests/crowsnets.html") and event a normal -tag but neither of these approaches allowed me any success.
I'm still not sure what are you trying to achieve. You can use Bing Maps control in your Windows 8 app and you can pin any Pushpins in there, You can also handle the behavior when user taps any pin and show more detailed info on the map.
Bing Maps SDK for Windows Store apps

UIWebView disable location prompt

Is it possible to disable the location prompt (or auto decline/accept it) that pops up when you visit certain websites that ask for locations? I am not using a MKMapView because my app will be not be just viewing maps (it just may visit websites that might have maps on it).
I'm guessing since the prompt is not being controlled by my app, but by the iOS system, I probably will not be able to auto decline/accept the dialog.
As far as disabling the prompt from within an IOS app while loading a UIWebView, it is possible.
You will need to intercept the html before it gets loaded into the UIWebView then find which part of it triggers the GPS/Location Prompt. Once you found it, you simply remove it from the html then feed the html into the UIWebView thus 'disabling' the prompt. However, as a result, the webpage will be missing that element.
No, it's not possible to do that. Not with UIWebView, not with any iOS browser.
I know no way to prevent the prompt, I hope it will be implemented as a property of the UIWebView.
The dialog is not there for the safety of the user, when it comes to UIWebViews. The app containing the view has already asked for locations access, and it can be enabled and disabled on settings. To ask for location access both from the app and from the web view, I would regard as a bug.

Safari Extension, Fluid App

I've written a simple extension for Safari that captures clicks on the RSS button in the address bar (calls to the feed:// protocol) and redirects to Google Reader instead of Safari's feed reader. If, however, the user has a Fluid app (one that opens Google Reader) set as their default feed reader the intercept doesn't work.
Is there any known way to capture a request that's being sent to a different app? The extension currently keys on document.beforeload(), but if the document is being opened in a new "app", it's never reached, of course.
Is there a different event I can catch? I haven't found a comprehensive list of events that extensions can catch.
Thanks.
Extensions are a part of Safari not webkit, so safari extensions aren't available in other apps that embed webkit (like Fluid).