0

I'm developing an Android App by using Flash Air 2.6. How to implement SMS functionality? Thanks!

2 Answers 2

0

This might help:

http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b24b55b57a124b32b5b57-7ffe.html

str = "sms:1-415-555-1212"; 
var urlReq:URLReq = new URLRequest(str); 
navigateToURL(urlReq);
1
  • Thanks! Do you know how to embed text in the message?
    – user867556
    Commented Aug 1, 2011 at 7:03
0

Air android native extension:

https://www.dropbox.com/s/gwkyz74r3ajp4p7/com.adobe.sendsms.ANESendSms.ane

Permission:

<uses-permission android:name="android.permission.SEND_SMS" />

AS3:

import com.adobe.sendsms.ANESendSms;
import flash.events.StatusEvent;

private function sendSms():void {
   var sms:ANESendSms = new ANESendSms();
   sms.addEventListener(StatusEvent.STATUS, statusHandle);
   sms.sendSms("667250202", "txt");
}

private function statusHandle(e:StatusEvent):void {
   if (e.level == "sent_-1") {// sent ok
   }
   if (e.level == "delivered_-1") {// delivered ok
   }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.