With all the great features and sheer power of the Android operating system, it is easy to forget that these devices are primarily telephones. In this recipe, we will demonstrate how to invoke the native Android telephone utility from within an application, passing along a phone number to dial.
Having the application invoke navigateToURL
and passing in a new URLRequest
with the correct URI of tel:
will open the default telephone application along with the specified phone number loaded up and ready to be dialed. In this example, we will perform this action once a TOUCH_TAP
event is detected:
1. First, import the following classes into your project:
import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.TouchEvent; import flash.text.TextField; import flash.text.TextFormat; import flash.net.navigateToURL; import flash.net.URLRequest; import flash.ui.Multitouch; import flash...