Hacks to access iOS APIs through Flex?
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? W开发者_C百科hat 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
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.
精彩评论