How to send SMS text message from Flash (AS3) iPhone app
I am developing an iPhone app with Adobe Flash and I can't figure out how to send a text messag开发者_如何学Goe directly from within the app.
You can open a new SMS window as explained here
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
But is it possible to send an SMS text message without opening the SMS client?
Or is it only possible by calling an external server?
Below are pretty much your only options:
http://www.adobe.com/devnet/air/quick_start_as/quickstarts/qs_using_uris.html
http://cookbooks.adobe.com/post_SMS_Texting_with_Flex_and_Air-12007.html
https://sites.google.com/site/freesmsuk/send-free-sms-with-flex
You'll have to test if any of these methods work on iPhone, as I know that the first method does indeed work on android.
Future versions of Adobe AIR on mobile are going to have support of Native Extensions. Using this, developers could make use of any of the native mobile features. You can join the Adobe Prerelease program for more insights into this and more future features of AIR
For Adobe Air as3 Android
public function gotoSms(e:MouseEvent):void{
navigateToURL(new URLRequest("sms:05432314403?body=Message text hello"));
}
sms:phone number
?body=message area
Regards
精彩评论