tags:

views:

29

answers:

1

i want to launch an intent from android website what code do i need to add in the HTML , for example how could i launch the dialer intent after the user click on number in the website .

i saw some example in the web like when you click download app in website and it launches the android market .

thanks

A: 

You cannot launch an arbitrary Android Intent purely in HTML. However, the browser automatically detects certain URIs and dispatches them appropriately.

To link to a phone number use the "tel" URI scheme:

<a href="tel:5555551234">Call me!</a>
codelark
it didn't work, it give me page not found. is that because im using webview ?
Fevos
if you're using a webview within an Android app, the application will have to manage the non-http uris by overloading the `shouldOverrideUrlLoading` method on the `WebViewClient`. The HTML code remains the same, the `WebViewClient` just needs to be updated to handle it appropriately.
codelark