0

Is it possible to launch applications by name with HTML/HTML5/Javascript?

For example, may we have some button on web page, which runs smartphone camera, allows user to take picture and then send it to site?

First question is if it is possible to do with pure web page.

Second question is if it is possible to do this with accompanying application? For example, may be it is possible to write mobile-platform-dependent protocol hanler for custom strings, like "launch", which will allow to have hyperlinks like

<a href="launch://com.android.camera">Open camera</a>

UPDATE

I found this https://developer.chrome.com/multidevice/android/intents

This article says it IS possible to launch application on android by their intent names. This is what I was looking for.

I am interested, if it is possible to do the same on iOS?

Dims
  • 47,675
  • 117
  • 331
  • 600
  • There is no reason to launch the camera app...You can use input types that do it. https://developer.mozilla.org/en-US/docs/Web/Guide/API/Camera – epascarello Apr 07 '14 at 15:56
  • Camera was just a sample. But Camera API is interesting: is it the part of browsers? How compatible is it? – Dims Apr 07 '14 at 15:58
  • 1
    Maybe this can help you http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser – user3434871 Apr 07 '14 at 15:58

2 Answers2

1

Short answer: No. The web browser is not supposed to access certain parts of the device. You're looking for an APP.

aldux
  • 2,774
  • 2
  • 25
  • 36
1

On iOS the answer is, "Yes, if the app exposes a URL scheme."

For example:

music://go

launches the built-in Music/iPod app (although the Camera app doesn't export a URL Scheme, as far as I know). Many third-party apps export their URL schemes—although not all shout about it—with a partial list here and another here, for example.

Wildaker
  • 2,533
  • 1
  • 17
  • 19