2
votes

I am building a Flex iPhone application that in an ideal world would need to open up the iPhone SMS interface to send texts, make calls, access phone information (such as phone number) and access contact lists... I realise there isn't much in the way of accessing phone specific API's through flex at the moment, does anyone know if or when this is coming?

My main question: I seen this interesting article on extending AIR to access android APIs and was wondering if there was anything similar for accessing iOS APIs? What are people doing at the moment if you need to access iOS APIs? Is everyone waiting for an update to Flex/AIR?

I'd prefer to not splash out on a Mac!

Thanks Phil

1
Flex is a mostly UI framework. So what's the deal with UI and iOS APIs? - average dev
Maybe I have worded it wrongly... sometimes I get AIR and Flex muddled up. I just want to create a Flex Mobile application that has access to iphone specific stuff such as contact books etc. But it appears there is no way to do this - p_mcp
call it AS3 or just Flash next time, can also mention AIR if it about extra stuff that AIR provides. - average dev

1 Answers

5
votes

You can use a URL Syntax from a Flex App to open the 'native' controls for sending / receiving text messages. You can do somthing like this:

navigateToURL(new URLRequest("sms:6175551212"))

It's not perfect, and still does not give you access to the address book, though. To add message text, you can use the body attribute as a URL variable:

navigateToURL(new URLRequest("sms:6175551212?body=hello%20there"))

(Source for body url variable)

I realise there isn't much in the way of accessing phone specific API's through flex at the moment, does anyone know if or when this is coming?

AIR 2.5 for TV has something called ActionScript extensions, which allows you to write native code that can then be used from Adobe AIR.

This Blog Post mentions "the Sony Tablet S2 you will use the upcoming Native Extension feature in AIR 3".

So, I perceive that Air 3 will support the same ActionScript Extensions on a wider range of devices.

I believe most people who have immediate / important access to AIR APIs are building Native Apps and not using Adobe AIR.


My update 1/18/2011; AIR 3 has been released and it does indeed support Native Extensions on iOS, Android, OSX, and Windows PCs.