0

I'm developing application for android by using flex. That app should read sms from android and analise them. How can i read sms? I've searched all over the Internet and couldn't find any articles which would be helpful.

Is there any way to do that instead of using native extention?

Kirill Popov
  • 310
  • 1
  • 2
  • 11
  • I don't know for certain, but unless sending sms is part of the Air runtime (I don't think it is), you'll need find a way to call down into Java code in order to access the Android API for that functionality. If you're able to send Intents, that may be the cleanest way. – Steve Blackwell May 16 '12 at 00:19
  • Yes. I am able to do that. It is doing by Native Extention which allows developer to insert Java or C code into his flex app. But i am looking for a way to do that by using only native flex functions. – Kirill Popov May 16 '12 at 00:46

1 Answers1

1

"Is there any way to do that instead of using native extention?"

Send sms - yes, but only by calling the device's native SMS client.

Receive/read incoming sms - no.

The Air mobile API includes features that allows you to send SMS messages by invoking the device's native SMS client. There are tutorials available online how to do this, for example this one.

The Air mobile API does not includes methods that allow you to read incoming SMS messages. To implement this on an Android device you would have to write your own Native Extension.This answer on SO explains how to set up a BroadcastReceiver using the Native Android SDK to listen for incoming SMS messages. If you need help on how to implement your own Native Extensions, the Adobe Developer pages on the subject is a good start.

Community
  • 1
  • 1
Gunnar Karlsson
  • 28,350
  • 10
  • 68
  • 71
  • +1; although the claim that AIR allows you to send SMS Messages could be a bit misleading. The URL syntax described in the post you link to will just open up the device's native SMS Messenger. It does not perform any sending / manipulation of the SMS message. – JeffryHouser May 16 '12 at 00:52
  • Thank you. It's sad adobe doesn't maintain one of the basic feature of mobile devices. Btw do you know any custom native extention which allows you to operate with incoming messages? – Kirill Popov May 16 '12 at 01:03
  • 1
    @Kirill. No, unfortunately not. I did the usual search for it on google and github but no success. If you write one yourself, please share it with us:) – Gunnar Karlsson May 16 '12 at 01:16