How does Zoom's website launch Zoom Meetings from Google Chrome?
Can I do it using JavaScript? If so, how can I do it?
Confirmation dialog box (Image)
It's not done with JavaScript, but with plain HTML. The way it works is, you create an <a> with an href attribute with a protocol other than the ones a browser usually recognizes - that is, other than http, https, etc.
If the user has installed an application that recognizes the protocol, the browser will try to open that application.
Similarly to Zoom, for IRC links, you can see something like:
Link
If you click on that link, and your machine has software installed that recognizes the irc protocol, that application can be opened directly by clicking on the link (possibly asking you if you want to open it first).
There are lots of different protocols for many different applications. They're quite handy for getting info on a web browser to an application on the user's computer.
For Zoom in particular, there's documentation on how to use its protocols here:
https://marketplace.zoom.us/docs/guides/guides/client-url-schemes
Making a link with a protocol registered to the zoom app on the operating system.
Related
I've found two ways to open the Whatsapp app from a webpage,
whatsapp
and
whatsapp
I understand the first one works on phone only but apart from that what are the differences between the two?
In my trials I've found that the api method doesn't always work properly in certain mobile browsers. In some cases it doesn't detect the installed app and takes me to the Appstore to install the app.
Does the first method work across all platforms and browsers?
Is it safe to use JavaScript to detect the platform (desktop or mobile) and then load the appropriate link format?
The first approach usually requires the browser / OS to understand how to handle the whatsapp:// protocol. This usually requires some setup beforehand (e.g. registering a protocol in Chrome, or a deep link schema in Android), and the browser / OS will pass the request to whatever app / program can handle it.
The second approach doesn't require any setup, and passes the request to WhatsApp's API directly. This is less likely to completely fail, but as you've seen may have issues on mobile when an app claims it should handle all requests to the domain.
You're better off following WhatsApp's documentation, and using their wa.me domain for a universal link:
Universal links can also include a pre-filled message that will automatically appear in the text field of a chat. Use https://wa.me/whatsappphonenumber/?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message.
Example: https://wa.me/15551234567?text=I'm%20interested%20in%20your%20car%20for%20sale
This will handle all the complexities for you. For example, on Android that URL opens the WhatsApp app, on Windows that universal link redirects to the api.whatsapp.com URL, and Chrome asks if I want to use my installed WhatsApp program for it:
I need to check if app is installed on iPhone or android device, using javascript code only. As i am working on html website.
I have used
window.location="appname://";
but it makes me to open an app.
Thanks in advance.
As stated in the comments there are security and privacy reasons surrounding why you are not able to do what you are asking.
However, #CommonsWare, has already given a workaround to this problem, in a similar question, that has already been asked:
Fortunately, this is not possible, for obvious privacy reasons.
The closest that you can do is in the application, have an activity
that has an for some URL structure, and have a link in
the mobile Web site to a matching URL.
If the user clicks the link and the app is installed, the activity
will be a chooser option for the user.
If the user clicks the link and the app is not installed, or they
choose to stick with their Web browser from the chooser, whatever Web
page exists at that URL will be displayed (E.g., instructions of how
to download the app).
I'm trying to create a web page that automatically opens an Android app but only if app is installed. In case it's not it should redirect to another web page.
The app is already in production and is properly handling deep links like example://content?id=42. The format of the link could not be changed.
What I've already tried
1) Redirects and timeout:
window.location.replace('example://content?id=42');
setTimeout(function() {
window.location.replace = 'http://example.com/content?id=42';
}, 500);
Works fine for iOS but for Android it redirects to example:// immediately and thus gives me ERR_UNKNOWN_URL_SCHEME. Seems to be no go for Android.
2) iframe approach. Impossible in rencent Chrome versions. Also doesn't seem to work in Samsung browser.
3) Intents with S.browser_fallback_url. Works well but in Chrome only. Doesn't work in Opera and Samsung browser... most probably nowhere else but Chrome 25+.
use http://example.com/content?id=42 as the link and add the intent filter to your activity in manifest
<intent-filter>
<data android:scheme="http" android:host="example.com" />
...
</intent-filter>
However, a list of app registered, e.g. browsers, will show up when the link is first accessed on the machine.
You need to be aware of the browser of the client, and its operating system and adapt your site to them. For example, if the browser is Chrome and the OS is Android, use the Intent solution; if the browser is Safari use the example:// schema. You can get the info looking at the User-Agent header of the request, but I'm sure there are many open source libraries that can help you to get infos related to browser and OS.
Seems like you could at least approximate the experience by letting the user give a one-time assist:
Have your web page itself have the fallback url content.
When the page is hit check the user agent to see if the os is Android
If its Android, show the user a choice prompt/dialog to use web or Android
If they choose web (remember the choice with local storage), dismiss the dialog and show the fallback
If they choose android (remember the choice), redirect to the app with the intent:// URL (without fallback_url), will take them to market to install if necessary
After the first interaction, it'll work as you describe - automatically taking them to the web page or the installed app.
You can try using this scheme(to be sent to the user):
intent://details?id=X&url=Y&referrer=Z#Intent;scheme=market;action=android.intent.action.VIEW;package=com.android.vending;end";
X: Package name of the App
Y: Deep link scheme which should be defined in the App's manifest.
(Please refer this)
Here, they have used this URL as an example: "http://www.example.com/gizmos" , therefore Y should be replaced by this URL.
Z: Can be any data which you want to pass to the App via Google Play.
Please take note that any data which you pass should not be '&' separated because the original parameters are itself '&' separated.
PS: The Google Play makes a broadcast to the app. So make sure you receive the broadcast in a receiver.
I have seen several of these question from 1-2 years ago about Android pre-4.0. I want to ask this again for Android 4+.
I have a galaxy s3 running 4.3 and when I click on a pdf link it downloads the document rather than opening it in the browser.
I am building a website and it will have links to pdf documents. The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
Is there anything I can do to achieve this functionality, or does Android still not support this?
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
The stock browser does not support native viewing of PDFs. You can however redirect the link to google docs and view internally that way. To do this, launch your implicit view intent, as I suspect you are already doing, but prepend the URI with "https://docs.google.com/gview?url=" and Google will take care of the rest
Alternately, there are a few libraries that you will see linked around SO, but from what I saw while researching, most are proprietary and cost and even then they might not work 100%. Google docs is free and works as often as Google does, which given that this is their platform you have to imagine they make certain their service works close to 100% of the time.
it downloads the document rather than opening it in the browser.
"it" is a Web browser. There are many Web browsers for Android. A Web browser can do whatever it wants when the user clicks on a link to a PDF file.
The desired behavior when one of my users clicks on the pdf link on their Android device is for the pdf document to just open like it would on a desktop browser.
That is not the behavior of all desktop browsers, particularly depending upon user configuration (e.g., browser extensions). A desktop Web browser, like a mobile Web browser, is welcome to do whatever it wants when the user clicks on a link to a PDF file.
does Android still not support this?
Android is an OS. Android neither supports nor does not support this. Web browser applications will or will not support what you want.
I cannot control the device that a user is using, so I'm looking for a solution that would achieve this functionality in as many cases as possible.
You are welcome to test a variety of Android Web browsers, see if there are any that behave the way you like, and suggest to your users that you would prefer that they use those browsers. Your users, in turn, are welcome to honor or ignore your request.
Or, as Chris M points out, you are welcome to not show a PDF at all, but rather redirect the user to some URL that processes the PDF and renders it in some other way.
Whats the easiest way to build a simple 'web' application which is a single page, that just refreshes itself (using AJAX or something) to display continuously changing data hosted on various different servers on the internet?
I want to interface with (for example) Twitter, Facebook, Skype, Google Calendar, and any number of other services that have some type of web API.
The application does not need to allow user interaction other than to configure it with the authentication parameters needed to access those services.
It should be able to run full-screen with no UI elements showing, just the pretty information I am displaying.
I started to write an HTML file using Jquery but I am running into "Same Origin Policy" issues. Is there a way around this?
I'd love to just write this in Html/Javascript and run it in Google Chrome, is that possible somehow? I don't know how to get around SOP without hosting my own web server as a proxy to cross the domains.
Is there another alternative that is still pretty easy and simple? I looked into using the Windows Vista Sidebar but apparently you can't have a full-screen gadget.
I figured out that I can use the command line option for chrome:
--disable-web-security
And it will allow me to workaround the same origin policy, and since I am using this for a local application I can put the app in a virtual machine and let it run without too much worry.