Push notifications... at last!

For several weeks I have been working an ANE for iOS Push Notifications (APNS). I now have a beta with the following specs.
Methods:
registerForAPN( badges : Boolean = true, sounds : Boolean = true, alerts : Boolean = true, newsStandContent : Boolean = false ) : void;
unregisterForAPN() : void;
askForAPNtypes() : void;
setLocalBadge( badgeNumber : Number) : void;
Last method doesn't really have to do with APN, but was build in because you probably will need it.
All methods are void. For consistency all data is sent back through events.
Events:
REGISTERING - Just for debugging. Means registerForRemoteNotificationTypes was called.
REGISTERED - Means registration was successful. Returns deviceToken on event.deviceToken
FAILED - Means registration failed. Returns error string on event.info
UNREGISTERING - Just for debugging. Means unregisterForRemoteNotifications was called.
NOTIFICATION - Returns the payload of an APN as a string on event.info (not yet thoroughly tested, since I don't need it in my own implementation)
TYPES - Returns the currently registered APN-types as booleans on event.types.badges, event.types.sounds, event.types.alerts, event.types.newsStandContent.
Send me a PM with your e-mail address if you are interested in this ANE. Source code will not be released, just a ready-to-use ANE.

Hi anders-tbl,
Great that you got the Push notifications working... but I have some questions on it, it will be helpful if you can put up light that how you breakthrough them...
1. Does your implementation is able to give "aps" data to the app when app was not running in background and push notification comes to iPhone? if you can give a hint it will be helpful..
2. How did you overcome these "undefined selector" issues for " _stageLoaded" and " notifyASyncMessages"...
I too implemented the push notifications but for question 1 I get the aps data when app is running in background as "didFinishLaunchingWithOptions" never fires in native extension. and for question 2 it seems that these are internal engine methods which for now I have just over ridden with blank implentation to avoid crashes...
Nice if you can help..
Best Wishes,
Sanniv.

Similar Messages

  • Push notifications and iMessage won't work on iPod 4th gen refurbished after updating to last ear iOS

    My iPod has been working well for a while other than the battery draining very quickly. But just today I updated to iOS 6.1.3 and all of a sudden iMessage won't deliver the messages and my push notifications aren't showing up! I don't know what is making this happen, but this along with the battery issue is driving me crazy!!! Any help would be greatly appreciated!!

    Try turning off the following to conserve battery:
    Settings>Mail, Contacts, Calendars>Push>OFF
    Settings>Notifications>Mail>Gmail>Notification Center>OFF
    Settings>Mail, Contacts, Calendars>Fetch New Data>Off

  • Push Notifications to APNS Fail 50% of the Time

    Sending a notification to an iOS device fails half the time with this error:
       The Push Notification System returned an Internal Server Error
    Here is my setup:
    Free Trial version of Azure
    Sandbox certificates uploaded to a Mobile Service/Notification Hub
    App developed with PhoneGap and built using Adobe's PhoneGap Build service
    Using the com.microsoft.azure-mobile-services Cordova plugin
    I am able to use either the DEBUG page on the Azure site, Visual Studio 2013 (Server Explorer -> Azure), or the ServiceBusExplorer open source program to send test JSON messages to Apple. It works, half the time, and the other half of the time I
    receive the error above.
    Steps to reproduce:
    Open Visual Studio --> Server Explorer --> Azure. It points to my trial account.
    Context-click on my Notification Hub a pick "Diagnose"
    Under Device Registrations, I delete any registrations I've previously accumulated. There are now no device registrations.
    Delete and re-install the test app on the iPhone (iOS 8)
    Launch the test app. A new registration appears in the notification hub. The type is "Native." (I've also had problems with "Template.")
    Go to the Test Send tab; Recipient: Broadcast; Message Type: Apple (Default)
    I am using the default, sample notification (but I get similar outcomes with other JSON messages):
    {"aps":{"alert":"Notification Hub test notification"}}
    Hit "Send"; It fails. Under "Message Result:," for my single registration I have this error message: "The Push Notification System returned an Internal Server Error"
    Wait 90 seconds, hit Send again. The notification works, it appears on the phone, the message result is "The Notification was successfully sent to the Push Notification System"
    Wait another 90 seconds, hit Send again. The notification fails
    with the same Internal Server Error that it did the first time.
    Wait another 90 seconds, hit Send again. It works perfectly just like it did on the second attempt.
    Overall it is working about half the time. In the example above, it worked every-other time, but this is not always the case--it can succeed multiple times in a row or fail multiple times in a row. I'm not changing the JSON at all between
    the above test messages. Even if I vary the JSON, I get the same outcome. I get similar outcomes regardless of whether I do the testing through Visual Studio (above), the Azure portal (the DEBUG tab), or through the ServiceBusExplorer program.
    What is causing this? How do I troubleshoot this?

    Hi David,
    I don't have an answer for you, but I wanted to chime in because I am having problems as well. I get the same "The Push Notification System returned an Internal Server Error" message trying to send a test push via either the Debug tab in the manage.windowsazure.com
    console or in Visual Studio.
    I have been focused on troubleshooting this problem since yesterday (Saturday February 21) but I believe it has been happening quite a bit longer.
    At one point I was able to get some notifications through after clearing all the registrations, but now it is failing again. I have had the same certificate since last April (2014) and it has worked fine, so I know the certificate setup is good.
    More data points:
    using the SimplePush PHP script from
    raywenderlich.com with the same certificate, the notifications go through immediately.
    Normally we send notifications from our Mobile Service using the Javascript backend, and it gets a "success" response from the Notification Hub even when it fails, e.g.
    {"isSuccessful":true,"statusCode":201,"body":"","headers":{"transfer-encoding":"chunked","content-type":"application/xml; charset=utf-8","server":"Microsoft-HTTPAPI/2.0","date":"Sun,
    22 Feb 2015 05:05:20 GMT"}}
    We have another notification hub with our production certificate, and it seems to be working better.

  • IOS 8 push notifications don't work

    Hi everyone,
    I'm using an iPhone 5s and updated to iOS 8 last Sunday. Since I installed it, I experience a total loss of push notifications from third party apps (e.g. WhatsApp, Facebook, Facebook Messenger, GMX Mail, wetter.com, Tagesschau and so on). I'm using the phone on Vodafone's German network.
    Does anyone have an idea how to solve this problem without a complete reset. I've found some possible solutions by they only apply to iOS 7.
    Thanks a lot in advance!
    Simon

    More than likely a problem with the FB app not fully compatible with the new update.   I would let the app developer know of your problem and see if they can resolve it.

  • Push notification

    I am an iphone 4s user.
    My phone worked fine until last week, then suddenly it stopped receiving push notifications from facebook and my gmail.
    I have to manually log into facebook and email to see notifications and new emails.
    Can you help me solve this problem?

    Hello, 007karnani.
    Thank you for posting and welcome to the Nokia Support Discussions.
    What's your phone model? We'll be more than happy to assist you if you will explain your concern further. 

  • IPhone 4 push notification delay

    Hi guys,
    I have a problem with iPhone push notifications for the last two weeks. I use the same wifi network at home and in the office and the same devices (MacBook Pro with retina display, iPad 3rd gen and iPhone 4). While the iPad and MacBook Pro receive iMessages, Emails, Twitter and Facebook notifications and all the other notifications at the same time, the iPhone receives it 5–10 mins later or even more.
    I have push turned on. I have tried to restore the iPhone and restored data from the backup (because I need data on it). I don't know what is the reason and why it started happening. I haven't install new apps this time or changed settings etc.
    Any ideas? iPad and iPhone has the same iOS 5.1.1. Mac has the latest Mountain Lion 10.8.1 as well.
    I saw people saying it's the problem of iOS 5.1.1, but iPad works fine in my case, so the problem might me different.

    Okay, if you set up Gmail and Yahoo mail in the Exchange fashion, then push should work. However, there have been a number of posts on this and other forums about the failings of Yahoo push for some time now. I would believe this could be your issue with that. As far as Gmail, if you have push set up correctly in all the areas for that and it is set up for the Exchange version, it should work. I do not use either of these mail providers, so I cannot make comments based on personal experience. As far as Facebook is concerned, I would suggest turning off the notification and then turning it back on again. I use Facebook but not push notifications as it is not that important to me, however there is a section in Settings, Facebook and that sets push notifications.
    If none of this corrects your Facebook issue, I suggest a restore. When connected to iTunes, you can click on Restore. Make sure you do a backup of the iPhone, you sync your contact and calendar data to the supported application on the computer and import photos from the camera roll. Try a restore from a backup first, and if that doesn't work, then a restore as a new device. Then sync information back to the iPhone from iTunes.

  • Push Notifications keep disabling?

    I've noticed the last few days since I have updated to iOS7 and updated the facebook and twitter apps my push notifications for facebook and twitter seem to keep vanishing overnight. When I wake up in the morning I see I've had no notifications from either app overnight and they are gone from my notification center. I have to launch both apps when I wake up and I will get the pop up asking to authorize the app to send notifications and I click OK. Then I have to go into the notification center in the settings where they will now be back in the list where they always were and change back from banners to alerts.
    I go through the day fine and will then get alerts sent to me all day for everyone and everything I have set them up to send to me then overnight the next night I get none again and in the morning I have to go through this all over again. No notifications all night and I have to launch both apps and get the message asking to authorize push notifications which I will OK again then have to go into the notification center to change back to alerts from the banners. At first I thought it was something with the Twitter app but now facebook has started doing it as well so I don't think it's an issue with just the Twitter app. Maybe it's because I'm still on the iPhone 4 (thank you contract agreements & not being able to upgrade) and something is glitching with it? I don't know. It's played well with iOS7 otherwise. I depend on the alerts to catch up on what I miss during the day so I really don't want to have to remember to go into these apps every morning to re-authorize the push notifications then go to the notification center to reset them to "alerts" so I don't still miss smething because it then defaults to the useless banners again. Anybody else seeing this issue?

    It's not happening as frequently but it is still happening to me. I wouldn't care quite as much if Apple didn't decide to make "banners" the default. I have everything set for "alerts" so when they all go away I then have to go into every app and OK the push notifications again then go into the settings to change them back to "alerts" from the defaulted "banners". Come on Apple either fix this or at least give us the option to set "alerts" as our default notification setting. Not all of us like the banners!!! I hate them!!!
    Also as an unrelated annoyance I've also now had to turn off my Twitter's badge app icon because it will constantly show a "1" now. I've deleed the app, info, changed passwords, unlinked the account, linked it back, all multiple times and it stil continues to show the red circled "1" badge app. Since that has happened since the last Twitter update I'm sure it's an issue there with their app and nothing on Apple's end but it's just as annoying.

  • So what's the deal with AIM and Push notifications?

    So we all get 3.0. AIM is supposed to get push. So going into the AIM prefs, "push" is the same old send an SMS to the iPhone number. The SMS comes in, you hit reply and the iPhone opens SMS app!!! It doesn't open AIM.
    This is nuts. Talk about things never changing.

    Randy Fast wrote:
    The app isn't yet updated to take advantage of the PNS. Just wait, a few are coming out now. AP news just got updated and has PNS settings.
    AIM was one of the apps used for testing Push for the last 10 days. And I'm using the paid version. One would think then it would be working.
    I've been using BeeJiveIM for so long, I bought AIM today to see how the Push works.
    So what you are saying is Push notifications are still not implemented?

  • Problem with ipad 2 and push notifications

    Hi, first of all excuse me for my english but i am italian.
    I have a problem with my ipad 2 16gb only wifi, i have activated the push notifications of several app (like twitbird or IM+) but when i close this app i don't receive the pop up notifications of the message that other people send me, or the twit...and in fact i must to re-enter in the app to read the news!
    I have also restored my ipad but nothing.
    How do i fix the problem?
    ps the fw of the ipad is 4.3.3...

    Greetings rusfrco,
    After reading your post, it sounds like you are experiencing an error with app updates app on your iPad. You may want to consider restarting the device first, and then resetting if that does not work. This article provides detailed instructions for Restarting, and Reseting:
    Turn your iOS device off and on (restart) and reset
    How to restart
    Press and hold the Sleep/Wake button on the top of your device until the red slider appears. Then drag the slider to turn your device completely off.
    After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
    How to reset
    You should reset your device as a last resort and only if you can't restart it.
    To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
    Thank you for contributing to Apple Support Communities,
    BobbyD

  • Push Notifications and Enterprise

    Hello there,
    We have been upgraded from woodwing to Adobe DPS last month.
    We are slowly getting back to the way it was before and know that some features will come in future updates.
    There is only 1 thing I don't get or could find any documentation for was Push notifications on a enterprise build.
    We have the app build for enterprise, but the mobileprovsion requires a app ID with a asterix(*) in it.
    Apple sees this as a wildcard and thus I cannot configure the Push Notifications for the provisions.
    So that is not really a big deal, cause we always have 3rd party options.
    Now I noticed that the viewer builder gives you the option for Apple push and adobe push, and a custom url.
    But whenever I choose the option above that saying its a 'Enterprise Build' I cannot check the Push buttons.
    I cannot setup any Push at all.
    So does anybody know how to setup push notifications for a enterprise build app, or have any Documentation on how to set it up?
    Kind Regards,
    Patrick van Zadel

    Hi Bob,
    The Publishing Companion Guide (for Viewer Builder 2.1) outlines the steps to produce the required Apple APN certificates. However, as Patrick points out, the latest viewer builder does not allow one to configure push notification support for Enterprise signed viewer apps. Essentially, once one selects Enterprise viewer, the Push Notification fields are disabled. See the screenshot below...
    What is the recommended way to enable this for Enterprise builds?
    Thanks for your help,
    Matt

  • Lack of Push Notifications since OTA

    Ever since I took the OTA Firmware update last week, I have had issues with a lack of push notifications on my Incredible 2.  Gmail, work email, Facebook, InstaGram, Twitter and more all require a manual "refresh" for me to get my emails and more.
    I also have this battery charging issue that appears to be widespread on the boards here, but that is another matter.
    Anyone else experiencing this push notification issue since the OTA?

    FWIW - The Background Data option under "Accounts & Sync" in Settings was disabled by the OTA.  Not only was my Exchange disabled, but I had to re-enter my Gmail address.  Once enabled and re-entered, I seem to have re-enabled my push notifications.
    Now about this battery charging issue....

  • Android devices not getting push notifications after a while

    We have just installed a new Exchange 2013 setup and started to move mailboxes across. Users that have Android devices though are noticing that push notifications are not reaching them and checking in the ECP I can see their last sync times are a long time
    ago! 
    If they restart their devices then the sync occurs and push notifications work for about half a day then stop again. 
    We have no issues with any iOS devices getting push notifications. We have a range of Android JellyBean and KitKat deployed so not looking device related. If I turn off push notification on the Android device and force a manual sync every 5 minutes that
    works and currently seems to be my workaround. But this will drain the battery quicker now. 
    The flow of notification would be simple, Exchange2013 > Firewall > Internet > Device
    Anyone else experiencing issues like this and know what to check? We have checked all networking aspects and its not a network/firewall issue. 

    After hours of searching online and testing and troubleshooting I found the issue actually was affecting push notifications to all mobile devices on Exchange 2013 where their mailboxes had been migrated recently from Exchange 2010. 
    There is a bug in Exchange 2013 CU5 which I am on which causes issues after mailbox migrations and requires the ActiveSync app pool in IIS to require a restart after mailbox moves to function correctly. 
    After I completed an iisreset within a command prompt on the CAS server everything started working for push notifications. 
    Lets hope this gets fixed in CU6!

  • Work Manager 6.0 Push Notification not working

    Hi All,
    I have configured Standard Work Manager 6.0 application and now I am trying to configure Work Manager 6.0 Push Notification.
    I have completed all Post Installation(optional and required) which are mentioned in Standard product document.
    I am getting new work order entries in /SYCLO/PSH01 and /SYCLO/PSH02. After that Agentry server is also calling /SYCLO/PM_DOPUSHWORKORDER_GET Function Module and /SMERP/CL_PM_PUSHWORKORDER_DO Class Handler.
    I am getting result in final export table(ls_mdo_output_vals) of /SMERP/CL_PM_PUSHWORKORDER_DO.
    My problem is still I am neither getting this work order into ATE nor push notification message.
    When I went to Syclo Admin panel, status of the push notification is also NEW.
    I have configured 8282 port in [HTTPXML-2] section of Agentry,ini and Syclo Config panel outbound trigger.
    Kindly let me know what can be an issue?
    Regards,
    Mohit Verma.
    Message was edited by: Michael Appleby

    Mohit,
    I noticed the following in your Backend-Java.log.
    ~~~~~~~~error 1~~~~~~~~
    2014/06/27 17:37:36.947: Error in initializing the StepHandler from the ini file or SAP configurations (com.syclo.sap.component.serviceorder.stephandler.ServiceOrderRemovePushStepHandler). Please check the JavaBE.ini file. java.lang.ClassNotFoundException: com.syclo.sap.component.serviceorder.stephandler.ServiceOrderRemovePushStepHandler
    ~~~~~~~~end~~~~~~~~~
    <-- Make sure this is corrected. For some reason your java code is not being detected during start up. Check your Java folder in the root directory of your Work Manager 6.0 to see if it can be seen.
    Based on history of Support tickets the following SAP Note is mandatory to make Push work:
    1. Do mandatory SAP Note: 1954444
    2. Please review: 1828657 - Release strategy for the ABAP add-ons SMFND, SMERP, SMISU, and SMCRM (Make sure you installed the correct add-on - look at the spelling in detail)
    3. SCN Push threads that may help: http://scn.sap.com/thread/3494003
    See if any of the comment above will work for you.
    4. After you tried the above and it didn't work for you to try the latest SMP 2.3 SP04 version and let us know. This is for what I can see on the logs.
    ~~~~~~~~Error 2: Backend-java log~~~~~~~~~
    2014/06/27 17:40:35.471:             Getting Java results in the the 'WorkOrderPushForEventSteplet' step (java class com/syclo/sap/component/workorder/steplet/WorkOrderPushForEventSteplet)
    2014/06/27 17:40:35.471:             : 1 lines, 0 non-printing characters, 20 total characters
      The module is 'PM'
    2014/06/27 17:40:35.471:             The root object is 'WorkOrder'
    2014/06/27 17:40:35.471:             Trying to read results by calling getReturnData()
    2014/06/27 17:40:35.471:             : 1 lines, 0 non-printing characters, 81 total characters
      getReturnData() method returned null, falling back to reading _returnData field
    2014/06/27 17:40:35.471:             Processing public field _returnData: Ljava/lang/Object;
    2014/06/27 17:40:35.471:             _returnData is a single object: 'Ljava/lang/Object;'
    2014/06/27 17:40:35.472:             Mapping public fields of Java Class 'java/lang/Object' to Agentry object 'WorkOrder'
    2014/06/27 17:40:35.472:             No public field userid found in java/lang/Object for user ID, and not in per-user mode: cannot determine user for data.
    ~~~~~~~~~end~~~~~~~~~~~~~~~~~~
    The log comment above is stating that the push is trying to be sent to the PDA/handheld but it does not know where to send it to.  This is proven from your backend setup and when you have no errors in your push retry.
    The last line above is still a mystery to me as there are lots of upgrades with patches and SMP 2.3 SP# and with the userid is not found (especially when it states it is not in per-user mode: cannot determine user for data) then the Agentry Server cannot determine where to send the push to.   Hopefully somebody in this thread knows this.
    Regards,
    Mark Pe
    SAP Senior Support Engineer (Mobility)

  • Push notification not working anymore on replaced phone

    Hi!
    I'm encountering a problem with Push Notification. My iPhone 4 (iOS 4.3.3) was replaced last friday by an Apple Store. I restored everything on it using the iTunes backup but Push Notificasion seem to be broken now: I don't receive anymore Facebook or WhatsApp ones (the only app with Push that I have). I've tried to uninstall and reinstall them again, without any change. What should I do?
    Thanks!

    Yes, everything is turned on there! I've also tried to disable and renable it, but no change.

  • In the Apple Push Notification Service,How long does a push notification sit in queue before being removed?

      Official developer documentation isn't clear about this.
    Apple Push Notification Service includes a default Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification but the device is offline, the QoS stores the notification. It retains only one notification per application on a device: the last notification received from a provider for that application. When the offline device later reconnects, the QoS forwards the stored notification to the device. The QoS retains a notification for a limited period before deleting it.

    This is an iPad user to user forum, so you are not addressing Apple. We have no way to know what and when Apple will do something.
     Cheers, Tom

Maybe you are looking for

  • Regarding Characteristics variable with Replacement path

    Hi Masters I have created one replacement path variable on characteristics for 0material for first query. This query contains the details of material number only(50 values are available). My second query contains material numbers and material price a

  • Pavilion G6 2249WM powers on but does not boot - black screen

    I have a G6 2249wm that had a message that the fan wasn't working. I had the fan replaced and after it was replaced it would not boot. I could hear the fan running and the caps lock light blinked once about every 5 seconds and the amber wifi light wa

  • Doubt in file 2 idoc scenario

    hi, I am trying to execute to file 2 idoc scenario. I created DT,MT for XML file outbound system. After importing idoc how can i create DT, MT for idoc to connect oubound DT,MT (file side)? I am following this wiki guide https://www.sdn.sap.com/irj/s

  • No Backend Document created

    we have setup extended classic scenario in SRM 7. The Shopping Cart creates a local PO but there is no backend PO created. We do not see any errors in RZ20 or ST22. Are we missing any config? Appreciate any inputs. Thanks, AB

  • Istallation of oracle 10gR2 on Red Hat L 5.3

    i m trying to install oracle 10gR2 database on Red Hat Server 5.3 32 bit, but database installation don't start properly. please help how to install oracle database 10gR2 on Red Hat 5.3