• Introduction
  • Dev Environment Setup
  • Developing Apps
  • Data Handling
  • Device Capabilities
  • Testing & Debugging
  • Extending
Warning Unreleased Docs! - You may be viewing documentation that reflects an upcoming release and the functionality described may not be in the current version you are using. Change the version above to the most recent version.

Using Hyperlinks for Email, Phone Dialing, SMS and others

You can allow your users to send email messages, call phone numbers and send SMS messages using the hyperlink (<a href="...">) syntax. Please note not all of these examples could work on simulators! Use real devices for test. Examples are shown below.

To make phone calls enable the phone capability. This is done by adding the following lines to build.yml:

capabilities:
  - phone

mailto

<a href="mailto:test@host.com?subject=testing123">Mailto</a>

Note, even for an empty address, you must add the @ symbol: Mailto

Blackberry: if you need cc, bcc fields, use rhomailto scheme: :::html Send e-mail to test@host.com

tel

<a href="tel:1-555-531-3255!8335033#!#!9582#">Tel</a>
<a href="wtai://wp/mc;5195551212" title="Call">Work Tel</a>
<a href="wtai://wp/mc;5195551213" title="Call">Home Tel</a>

Note, the WML tel description can be found here.

sms:

<a href="sms:+3581234567">Send SMS to us </a>

Open link in external application (browser for http:// links): :::html Open Google in external browser

Open appstore on iphone: http://wiki.akosma.com/IPhone_URL_Schemes#App_Store

Using from Ruby

When using jQuery and/or jQuery Mobile in application code, you cannot use usual html links for hyperlinks. You need to call controller action and call WebView.navigate from there:

#Ajax call of controller method:
$.get("/app/TestController/send_mail",function(data) {});

#TestController method:
def send_mail
    WebView.navigate( 'mailto:test@host.com' )        
    #to open url in external application you can use System.open_url
end
Back to Top