Skip to main content
Known Participant
February 7, 2014
Question

Local Notification

  • February 7, 2014
  • 2 replies
  • 9314 views

hello,

I am developing an App with Adobe Air and I need someway (ANE) to send a LOCAL notification.

I do not want to use Push notification, only LOCAL.

any suggestion on what ANE I should use?

I would also like it work for both platforms, android and IOS

Thanks in advance!

This topic has been closed for replies.

2 replies

marchbold
Inspiring
May 8, 2014

Hi all,

Glad to hear the positive feedback on our local notification extension.

As to the sound problems, it is due to the default setting for the application being turned off. Unfortunately there's no way to control this setting programmatically (at the moment at least) and I haven't been able to figure out why some apps have the default notification sound off and some not. It is happening to native applications as well so it's not an AIR related issue.

So the best advice I have at the moment is to be aware of it and make it a part of your help / guide for your application.

Cheers,

Michael

air native extensions // https://airnativeextensions.com
Inspiring
February 7, 2014

The best one, in my op, is Distriqt's local notif ANE:

http://distriqt.com/native-extensions

For local notifications, I recommend Distriqt's local notification ANE ( Android+iOS), since it's the ony one I know which uses the AlarmManager api on Android ( Koesler's Android Local notif doesn't last time I checked ).  This means that on Android, the local notification can be scheduled for a later time ( same as iOS ), and will fire EVEN if the app is either minimized or has been closed properly ( meaning closed by the OS, or by the user via NativeApplication.nativeApplication.exit() -- note: force-stopping is the exception and cancels scheduled notifications on Android ).  You can also have the local notification play a custom sound which is up to 30 secs long ( mp3s on Android / cafs on iOS).  Sound will be audible on both platforms, even if the device is suspended.  This is ideal for an alarm-clock, for example.  The downside of local notifs is that they don't execute code, per se, however they can pass a data payload ( text ) back to the app, if it is running ( even if minimized ), which a handler can receive to do stuff.

A bit more info about this ANE here:

http://forums.adobe.com/message/6095693#6095693

Participant
March 18, 2014

Hi Aster         

I have been trying out the Distriqt extensions. The local notification one works quite well.

Only things is that is does not play the alert sound when receiving the alert.

Im trying to have a sound play when the user receives a local notification (app is closed or in background)

But it does not play a sound. My other apps of different sorts are doing alert sounds just fine

Im using this code:

notification.vibrate = true;
notification.playSound = true;
notification.soundName = "fx05.caf";

on Iphone5, ios 7

And i have added the sound fil to the "included files"

Any experience with this ?

Thanx in advance

Henrik

Colin Holgate
Inspiring
March 18, 2014

The distriqt boys are extremely quick to respond, but it’s a little before 4 am for them at the moment. If they don’t reply to your post in their general discussions you could raise it as a github issue. Then they will see it quickly.