Skip to main content
Inspiring
July 9, 2013
Question

Can you update the notification bar without a push API?

  • July 9, 2013
  • 1 reply
  • 412 views

Is it possible to update the notification bar from an actively running app without using push APIs? I realize that some devices do not run apps in the background, or they run them in a suspended mode, but if the application is running is there a way to simply send a notification to the notification directly without using a roundabout push API?

Given the use case where I want to gently notify the user that the running application could use attention but I don't necessarily want to bother the user if the app isn't even open, using the notification bar seems like a solution. Is this a possible workflow?

-Aaron

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
July 9, 2013

You can do local notifications. Those don’t require a push server, and the notice should appear within a thousandth of a second of the time that you have set.

I suspect that the notification can only be set while the app is in the foreground, but the alert will appear at the specified time even if the app is closed.

Inspiring
July 9, 2013

Thanks, that's great!

Is this something that there is an AIR API for, or do I need native code? Everything I'm finding on the AIR notification API seems to be geared towards push notifications... am I missing something?

-A

Colin Holgate
Inspiring
July 9, 2013

You would need an ANE (AIR native extension). There are a few to choose from: https://www.google.com/search?q=anelocalnotification