I started using Adobe Native Extensions ANE on iOS projects months ago, but then I quickly felt limited because sometimes extensions didn’t do exactly what I wanted and sometimes there was no native extension for some not widely used iOS features. Then I started studying Objective-C to try to overcome these limitations myself. I started by modifying the Daniel Kostler’s Local Notification ANE posted in the Adobe site (see Added Features below).
This post explains how to download the ANE source code and update it if you want to. If you only want to include the ANE in your Flash projects see my next post here.
I know little about Android but yet managed to add some features though not all of them.
- Placed all classes in a new namespace.
NotificationManager.applicationBadgeNumberproperty allows you to set and get the value of the application icon badge number.
Notificationclass has three additional properties:
fireDate: This property will let you pass a Date object with the date when you want the notification to be triggered.
repeatInterval: This property allows you to define a repeat interval between notifications. If no repeat interval is specified it triggers a single time. This property must be set to one of the constants in the
soundName: This property specifies a sound file name to play. For the sound to play it must be a wav, aiff or caf sound file using Linear PCM, MA4, µLaw or aLaw format and must be shorter than 30 seconds. It seems AIR is converting from MP3 to the needed formats.
- The native iOS code was cleaned up. It looks like at the beginning they were trying to support Local as well as Remote(Push) Notifications. But then they just decided to support only Local, and a lot of garbage code was left in there. Besides, this test code was depending on a large library that was not included with the ANE. Without this library the project couldn’t compile.
- Added a default version of the ANE that does nothing, to allow compiling debug versions on Desktop computers.
- Documentation updated to reflect the extension additions.