Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / Adobe AIR Developer Center / AIR Quick Starts for ActionScript developers /

Using the tel: and sms: URIs in a mobile phone application

by Sunil Bhaskaran

Sunil Bhaskaran

Content

  • Using the tel: URI scheme
  • Using the sms: URI scheme
  • Using the sms: and tel: URI schemes in a text field
  • Where to go from here

Created

22 November 2010

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Adobe AIRFlash BuilderFlash Professionalmobile
Was this helpful?
Yes   No

By clicking Submit, you accept the Adobe Terms of Use.

 
Thanks for your feedback.

Requirements

Prerequisite knowledge

Familiarity with ActionScript 3.

 

Additional Requirements

  • Android 2.2 device or emulator
  • Android SDK

User level

Intermediate

Required products

  • Flash Builder 4 (Download trial)
  • Flash Professional CS5 (Download trial)

A Uniform Resource Identifier (URI) is a string that is used to identify a resource. For example, in a web page, if you click an e-mail ID embedded with the mailto URI, the default e-mail client in your system opens with the e-mail ID in the To list. Adobe AIR 2.5 allows you to use two new URI schemes, tel: and sms: , to access the system phone dialer and system SMS application.

Note that the tel: and sms: URI schemes behave differently on different devices and different platforms. For example, if the SMS program is not properly configured on a device, the sms: URI does not work. Likewise, on the Android platform, the URI scheme must be specified in lowercase.

In this article, you will learn to use:

  • The tel: URI scheme with the navigateToURL() function
  • The sms: URI scheme with the navigateToURL() function
  • The sms: and tel: URI schemes as hyperlinks in a text field

Using the tel: URI scheme

To use the tel:URI scheme to launch the system phone dialer, create a URLRequest object containing the telephone number and pass the object to the navigateToURL method in the flash.net package. The following example illustrates how to do this:

public function call():void { const callURL:String="tel:1234567890"; var targetURL:URLRequest = new URLRequest(callURL); navigateToURL(targetURL); }

When the function is run on a phone, the default dialer is launched with the telephone number already entered. (The user must still initiate the phone call by pressing the call button.)

Figure 1 shows the way a tel: URI opens the telephone dialer on an Android mobile phone.

This is how a tel: URI opens the telephone dialer on an Android mobile phone.
Figure 1. This is how a tel: URI opens the telephone dialer on an Android mobile phone.

Using the sms: URI scheme

You can use the sms: URI scheme exactly the same way you use the tel: URI scheme:

public function sms():void { const callURL:String="sms:1234567890"; var targetURL:URLRequest = new URLRequest(callURL); navigateToURL(targetURL); }

When the function is run on a phone, the default SMS client is launched with the telephone number already entered as shown in Figure 2.

The default SMS client is launched with the telephone number already entered as shown in Figure 2.
Figure 2. The default SMS client is launched with the telephone number already entered.

Note: Setting the body text in the sms: URL is not currently supported due to a limitation of the Android operating system.

Using the sms: and tel: URI schemes in a text field

A TextField object can display simple HTML content. You can use tel: and sms: URI schemes in HTML hyperlinks. For example, the following code creates a text field displaying a hyperlink:

var call:TextField = new TextField(); call.htmlText ="<a href='tel:1234567890'>Call</a>";

When the user taps the Call link, the application launches the system phone dialer. In the same way, you can create hyperlinks containing an sms: URI.

Where to go from here

In this article, you learned about using the tel: and sms: URIs in your applications. For more information, refer to ActionScript APIs specific to mobile AIR applications in the online Help documentation.

More Like This

  • Using the StageWebView class
  • Capturing video input in a mobile AIR application
  • Using the Adobe AIR Geolocation APIs on Android
  • Capturing soft key input

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement