This component allows sending Local Notifications that will trigger on a later date. It lets you specify message text, buttons, sound to play, a date to trigger, the interval between notifications, and more…
Now I’m going to explain how to use my modified version of Local Notification ANE using Flash CS5.5/CS6 and Flash Builder 4.6. If you want to improve the ANE with your own source code see instructions in my previous post here. You will also find a list of the added features there.
The Android version doesn’t support custom icons and sounds.
Continue reading “Using the Local Notification ANE”
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.applicationBadgeNumber property allows you to set and get the value of the application icon badge number.
Notification class 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.
Continue reading “Local Notification ANE – Source Code”