AIR 3.4 Push Notifications

Does anyone have an example of how to set up push notifications natively in AIR 3.4 ?  It is listed as a new feature.

One issue I ran into right away without thinking. Make sure you declare the styles,notifier and subscribe options as a class level property not scoped within a function call.
---> Start Class Body
        private var _preferredNotificationStyles : Vector.<String>;
        private var _rn : RemoteNotifier = new RemoteNotifier();
        private var _subscribeOptions:RemoteNotifierSubscribeOptions;
---> Within initialization function call
            if ( RemoteNotifier.supportedNotificationStyles != null )
                //trace("CNNMobile::supportedNotificationStyles::true");
                this._preferredNotificationStyles = new Vector.<String>();
                with(this._preferredNotificationStyles)
                    push(NotificationStyle.ALERT);
                    push(NotificationStyle.SOUND);
                    push(NotificationStyle.BADGE);
                this._subscribeOptions = new RemoteNotifierSubscribeOptions();
                this._subscribeOptions.notificationStyles = this._preferredNotificationStyles;
                this._rn.addEventListener(RemoteNotificationEvent.TOKEN, tokenEventHandler);
                this._rn.addEventListener(RemoteNotificationEvent.NOTIFICATION, notificationEventHandler);
                this._rn.subscribe(this._subscribeOptions);

Similar Messages

  • IOS Push Notifications Flex 4.6.0 and Air 3.8 - missing files?

    I was trying to use the example code in this tutorial here:
    http://www.adobe.com/devnet/air/articles/ios-push-notifications.html
    but Flex will not find and import the following files when i debug in the iOS iPhone simulator:
    import flash.events.RemoteNotificationEvent
    import flash.notifications.NotificationStyle
    import flash.notifications.RemoteNotifier
    import flash.notifications.RemoteNotifierSubscribeOptions
    I receive the following error: Error #1014: Class flash.notifications::RemoteNotifierSubscribeOptions could not be found. Even though i see them in the airglobal.swc in the file explorer window.
    Is there something i'm missing?
    Thanks in advance.

    Hello,
    I'm facing the same problem! Can't find the answer anywhere!
    The tutorial works fine on Flash Professional CC 2014, but not on Flash Builder 4.7.

  • Air 3.4 iOS Push Notification is not fired when app is not running and is not in background

    Hello,
    I'm making an Air iOS application which uses the iOS Push Notification from Air 3.4.
    All is working perfectly except when I receive notifications when the app is not running and is not in background (The app is killed).
    I suppose the RemoteNotificationEvent.NOTIFICATION must be dispatched when I receive a notification even if my app is not currently running or in background ?
    Do you have already get the same issue ? Do you know what can prevent the notification to be handled ?
    Thanks,
    Loïc

    issue has been fixed in the build available at http://labs.adobe.com/downloads/air3-5.html.
    You would now have to attach listener to InvokeEvent. For cases, when application is killed, InvokeEventReason will be InvokeEventReason.NOTIFICATION. The notification payload can be accessed by the following code
    protected function onInvokeEvent(event:InvokeEvent):void
         trace("Invokehandler called .... \n");
         trace("reason: " + event.reason + "\n");
         if( event.reason == InvokeEventReason.NOTIFICATION)
                        var payload:Object = Object(event.arguments[0]);
              for (var i:String in payload)
                    trace("Key:value pair " + i + ":" + payload[i] + "\n");
              // TODO: DO THE NEEDFUL ON RECIEVING A NOTIFICATION HERE

  • Native push notifications for Android in AIR 3.6?

    Hi there,
    I'm glad we finally got the support for native iOS push notifications with AIR 3.4, however Android support is still missing.
    Is there any chance we'll get this feature with 3.6? I really don't want to use the various native extensions that are available as none of them do work properly and are fully customizable.
    Cheers!

    Seems as if no one is interested in push notifications any more.
    Also, the feature list for 3.6 doesn't include notifications, so it's is at least half a year from now till we'll see this from Adobe, if it's ever gonna happen...

  • How can I implement GCM push notifications in AIR?

    How can I implement GCM push notifications in AIR? How can I implement GCM in Android using flex?

    You have 2 ways, first is buy the ane, are alot such as: http://myappsnippet.com/gcm/ or review the open in: https://github.com/freshplanet/ANE-Push-Notification or http://afterisk.wordpress.com/2012/09/22/the-only-free-and-fully-functional-android-gcm-na tive-extension-for-adobe-air/ , that for client side, for server side you can buy in http://urbanairship.com/ or enter in the world of build your own pisblisher server, in this case you need to read android and ios and blackberry notification, each one has different methods.
    Also, here you have more information: http://forums.adobe.com/message/4626292
    looks good.

  • "Missing Push Notification Entitlement" when submitting Air app to IOS AppStore

    After submitting my Air app (and update to the existing app) to the App Store, I've received an automated message from itunesconnect stating that my app is ""Missing Push Notification Entitlement". The full message is as follows:
    Dear developer,
    We have discovered one or more issues with your recent delivery for "xxxx". Your delivery was successful, but you may wish to correct the following issues in your next delivery: Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement.
    I've submitted multiple updates and never had this issue. Furthermore, I don't use push notifications, and as far as I can tell they are not enabled (nor where they ever configured or enabled) in the relevant app id on the developer portal nor in the application.xml. My Air app, as far as I can tell, isn't including any classes that are used to receive push notifications either.
    Any thoughts, ideas?

    Yup, i have the same issue here. AIR 3.5.something, Flash Builder 4.7 ... i received the damn mail today just seconds after successfully uploaded the app with Application Loader Version 2.8 (321). I didn't used any Push Notification services functionalities neither enabled it in the distribution provisoning profile. Like Alan_Haugen says the tone of the words make you believe that everything is fine, and that next time you upload stuff, take care to fix that. Don't know, will wait to see if the app will be approved.
    Adobe please don't get angry now - but maybe is time to take problems that developers using your technology have - more seriously. You know, we are the last ones defending your frontiers in the AIR / FLASH frontlines and maybe we deserved more attention here ???? I mean the answer you placed here is the same if someone had mechanical car issues, and you suggest him to try to stop the car and start the car again then all troubles will be gone. Cmmon.
    I mean there is only few calls to Apple needed and few hours of investigation to get there. And I think at least you can give us some credibility if you make us believe you are investigating the issue, and not redirect us off to stackoverflow - just like we are from Mars, and we didn't heard about it until today.
    I'm really sorry for maybe a litlle harsh words, and really i would like to continue to use AIR / FLASH technologies but you must understand and i'm 100% sure that more or less all people springling around here are in enterprises. And in enterprises there are no answers like maybe, don't know, not sure, will see, etc. Because with such answers you're dead in less than needed to close one eye.

  • In order to get APNs certificate for being a provider of push notification for an app, do I need to pay ?

    There are very poor instructions or how to create the certificate. The instructions are nice for creating
    of CSR etc. But no where is there any information of what type of developer you should be to get this.
    One outside link unrelated to apple says you should be an enterprise developer and paying
    $299/year !!! for this.
    This really and totally ***** and apple is just looting if that's a requirement.
    They can charge this for enterprises or companies. I am an individual user and would like to
    just have some push notifications sent using my own home server.
    If I go to https://identity.apple.com/pushcert/ (which redirects to another page prompting for login)
    and I login with my free developer account, it says that your apple ID must be associated with
    an email address etc (which is a wrong/irrelevant message).
    Does anyone know how to get a push certificate ?
    Is payment required absolutely ? Or can it be done without paying ?
    If payment is required, how do we encourage or make apple make it free ?

    http://www.networkworld.com/news/2012/020612-mdm-apple-255756.html says that for push and developer there are different requirements.
    Also, http://www.air-watch.com/downloads/GenerateAPNsCertificate.pdf says that
    "This does not have to be an Apple Developer Account. It can be any AppleID."
    But still with free apple ID I don't see anything that let's me create a certificate

  • Missing Push Notification Entitlement

    Hello all,
    I am trying to submit my app to the store, but everytime I finish submittint I get an email with a warning:
    Missing Push Notification Entitlement
    I'm using Xcode 5 and looks like all the documentation I found regarding this issue is irrelevant.
    I'm looking in my App Id and do see the push service production and development checked.
    I see no related capability in Xcode.
    Anything I should enable within Xcode to resolve this?

    Yup, i have the same issue here. AIR 3.5.something, Flash Builder 4.7 ... i received the damn mail today just seconds after successfully uploaded the app with Application Loader Version 2.8 (321). I didn't used any Push Notification services functionalities neither enabled it in the distribution provisoning profile. Like Alan_Haugen says the tone of the words make you believe that everything is fine, and that next time you upload stuff, take care to fix that. Don't know, will wait to see if the app will be approved.
    Adobe please don't get angry now - but maybe is time to take problems that developers using your technology have - more seriously. You know, we are the last ones defending your frontiers in the AIR / FLASH frontlines and maybe we deserved more attention here ???? I mean the answer you placed here is the same if someone had mechanical car issues, and you suggest him to try to stop the car and start the car again then all troubles will be gone. Cmmon.
    I mean there is only few calls to Apple needed and few hours of investigation to get there. And I think at least you can give us some credibility if you make us believe you are investigating the issue, and not redirect us off to stackoverflow - just like we are from Mars, and we didn't heard about it until today.
    I'm really sorry for maybe a litlle harsh words, and really i would like to continue to use AIR / FLASH technologies but you must understand and i'm 100% sure that more or less all people springling around here are in enterprises. And in enterprises there are no answers like maybe, don't know, not sure, will see, etc. Because with such answers you're dead in less than needed to close one eye.

  • Push notification iMessage after X Mavericks update

    hi everybody! I've just updated my macbook air (2012) to X Mavericks and suddenly I can't receive push notification in iMessage application anymore. How can I fix the problem?

    Just a suggestion, because this was how I ended up fixing mine:
    You need to go to Spotlight > Activity Monitor > Search "Notification" > Press Quit
    It reboots the notificaton center. If you want it, there's also a youtube video that's only 19 seconds that shows it: http://www.youtube.com/watch?feature=player_embedded&v=UeXx42iGUs4

  • IMessages, Facetime, push notifications not working on new iPhone 5!

    Hello Community,
    I just upgraded this afternoon from my iPhone 4 to a new iPhone 5. I am currently connected to my wifi network and just noticed iMessages and facetime wont work! I tried signing in using my apple id and it says check your connection and try again or waiting for activation. I know there isn't an issue with my apple ID as i used it on my old iphone 4 and just purchased some apps in the store and it worked great! wnl
    Also, the apps I downloaded are telling me to connect to iTunes to recieve push notifications, but push notifications are on for the apps! I also connected and synced my iPhone with my computer to try to solve all issues stated above, no dice.  I realize these questions have been asked several times, so sorry to repeat a thread! Any help appreciated.

    Hello there M.air.21,
    I think I have the perfect article for you. It's named iOS: Troubleshooting FaceTime and iMessage activation and can be found here http://support.apple.com/kb/ts4268. It should help you resolve any issues with getting FaceTime and iMessage activated.
    All the very best,
    Sterling

  • Push Notification for Android application

    Hi friends,
    I am trying to create a Reminder application. I Need some experts advice for developing this application.
    After surfing on Net I came to know we need to use Push Notification for showing the alerts but didnt get any help how to use it.
    I found some .ane extensions links by which we can show the notifications but was nt able to include it in my project.
    Please guide me for the application.

    Hey
    I guess you need this ANE http://www.riaspace.com/2011/09/as3c2dm-air-native-extension-to-push-notifications-with-c2 dm/
    Found it in this discussion, in which they basically explain everything, http://stackoverflow.com/questions/11244724/push-notification-in-flex
    GL ^^

  • IOS Push Notifications (ANE and tutorial) ?

    Hi,
    I am looking for a good extension for Push Notifications on iOS, with a step by step guide to get it up and running. Commercial or Free.
    Thanks!

    You can learn more about the next AIR mobile and desktop features by applying for our private prerelease program. By doing so, you'll get to know the features of the upcoming release in advance!

  • Push notification - iOS and Android

    HI,
    I was searching how to implement a push notification in flex mobile project.
    During my search i found that Adobe AIR SDK 3.4 support push notification for iOS; but for android there a native extension called C2DM, but unfortunaltelly it had been deprecated.
    In order to usser AIR 3.4 SDK i did an overlay for my Flex 4.6.0 SDK
    I have two question.
    The first one:
    Is there any thrid party where it implements GCM (Google Cloud messaging for Android).
    Second Question:
    How flex builder, or the app, will know when to execute the code that i am going to write for iOS.
    Thank you
    Elie

    Hey man if you are interested:
    Here is a FREE Adobe Air extension for GCM messaging. It is fully working (implemented in Google Play marketed app) and there is an example provided in the package.
    It also fetches the payload not only on "resume" but also when the app starts (after being closed by user or Android OS) You can download it here: http://wp.me/p2Inzv-9
    I made it after i couldn't find anything viable on the web.

  • Whenever i try and open a social network app it comes up with an error message sayinng "Connect to itunes to use Push Notifications" I have successfully conntected to itunes via phone and computer however this message is still appearing and will not go?

    Whenever i try and open a social network app it comes up with an error message sayinng "Connect to itunes to use Push Notifications" I have successfully conntected to itunes via phone and computer however this message is still appearing and will not go, therefore i cannot use the apps?HELP PLEASE

    http://support.apple.com/kb/TS3281

  • Ios7 and push notifications and music

    this update is really starting to annoy me now.
    everytime i go on texts/whatsapp/kik/ anything it tells me to connect my phone to itunes to use push notifications.. so i connected to itunes and got load of songs i didnt want on my phone and no push notifications.
    i have no idea how to delete the songs cause swiping accross doesnt work and clicking it just makes it play.. so help ??
    and how do i get my push notifications to work?! its driving me crazy
    i dont really wanna throw my phone at the wall but i can see it happening.....
    tia...

    https://discussions.apple.com/message/23019531#23019531
    Lots of people (myself included) are having similar issues.

Maybe you are looking for

  • Can I have the same netflix on apple tv and ps3 ?

    this is the question

  • Cannot copy external hard disk as its asking for permissions

    Not sure why my settings have changed, but now every time I copy data onto my external drive main directory it asks for my password. I checked and seems that my current user is read and write setting (prssing command i.) I also notice that on a few f

  • Reverting to original RAW image in ACR

    In the past I have almost always used Nikon's Capture NX2 as my RAW editor. In that, it's immediately obvious how to get back to the original NEF camera image, or even choose to go back to different stages in the editing history. There seems no obvio

  • Oracle Apps Custom Form, How to Filter data in the LOV

    Detail Data Block I am Calling One LOV, Based on Master Block Item I want to filter data in the LOV. in the select statement SELECT * FROM MTL_SYSTEM_ITEMS WHERE ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME specified but it is showing no data found error

  • Error - Oracle BI Server has encountered a problem

    Dear Experts, Oracle BI Server has encountered a problem and needs to close. We are sorry for the inconvenience. Error Signature : szAppName : NQSServer.exe szAppVer : 10.1.3.4 szModName : msvcrt.dll szModVer : 7.0.2600.5512 offset : 00037fd4 I am fa