开发者

Flash Air for Android, how to send SMS

I'm developing an Android App by using Flash Air 2.6. How to i开发者_StackOverflow中文版mplement SMS functionality? Thanks!


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);


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
   }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜