3

I want to be able to touch a link on a mobile web page and have it launch a native mobile App, like Skype, for example. This seems like it would be a huge security problem, but I wonder if the mobile environment somehow allows this?

EDIT: YES! It works. a javascript call to document.window = "myapp://myparam" works great! Or for example, the following works:

document.window = "skype://";

The trick is knowing the name of the app.

Doug Wolfgram
  • 2,064
  • 4
  • 27
  • 42

1 Answers1

3

No a mobile web page will not allow this but there are some alternatives.

When building a mobile application, you have 3 choices

  1. Native Application
  2. Web Application
  3. Hybrid Application

The first option is not device agnostic as you would need to program specifically for each device.

The second option does not give you the ability to access the Native device controls (at least not yet with HTML5)

The final option is to write a simple wrapper application in the Native Language and render a browser within. This can allow for the best of both worlds. Majority of Content is built as a web app but certain features can use the native language.

Here are two of those Hybrid Approaches

John Hartsock
  • 85,422
  • 23
  • 131
  • 146
  • Thanks. But I need to launch apps that I didn't write. I use Appcelerator Titanium for native apps, but this particular client needs a web app that calls several other native apps. What about this that I say in another post: window.location = "myapp://myparam"; done in Javascript in the mobile app. Does this work? I guess I'll try it. – Doug Wolfgram May 29 '12 at 01:10
  • 2
    Actually, it works! javascript call to myapp://myparam works just great! – Doug Wolfgram May 29 '12 at 01:28
  • I tried this but it didn't work for me. Is there a trick to get it to work or has it been deprecated? – user1203605 Oct 20 '13 at 06:20