Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 2 12 LastLast
Results 1 to 25 of 31
Like Tree18Likes
  1. markfive's Avatar
    Member

    Posts
    377 Posts
       #1  
    Introduction
    Push notifications - love them or hate them, you can't avoid them. Some people never seem to have problems with them, others seem to be plagued with unreliable notifications. There are a lot of things that can interfere with notifications, and hardly any of them are directly related to your device. This article is an attempt to remove some of the mystery from this subject, and perhaps give you some pointers on where to look next time you think you're having a problem.

    Why we need them
    Push notifications are now the dominant method for sending notifications from online services to mobile devices.
    There are a number of reasons why this method makes sense, but the biggest one is simple – it’s much more efficient in terms of battery life than having each application checking for its own notifications using its own method. That consumes processor time, data, battery - all precious resources on a mobile device.

    It's far more efficient - in most cases - to have notifications "pushed" to your apps.

    Notifications to Windows Phones are sent using the cleverly-named Microsoft Push Notification Service (MPNS), which is a cloud service provided by (no surprises) Microsoft.

    Types of push notification
    There are three different sorts of push notification:


    • Toast - displays a message at the top of the screen for 10 seconds
    • Tile - increments a counter on a Live Tile
    • Raw - used to send 'other' data to the app - useful for games



    For all three notification types, your app's cloud service can request that MPNS delivers the notification immediately, within 450 seconds or within 900 seconds.

    Toast notifications can be deep-linked to the app - so if you tap the notification it takes you to a specific screen in the app

    For toast and tile notifications, the app itself does not need to be running for the notifications to be processed - the OS (via the Push Client service, see below) keeps the notification channel open and handles these notification types.

    For raw notifications, the app has to be running on the device for the notification to be handled.

    How they work

    The process of getting push notifications for your app starts with the app itself.

    (From Push notifications for Windows Phone)


    1. The app communicates with the OS on your phone (specifically a part of the OS known as the Push Client Service) and requests to be registered for push notifications.
    2. The Push Client Service then talks to MPNS, and MPNS provides a URI (Uniform Resource Identifier - see Uniform resource identifier - Wikipedia, the free encyclopedia) for the app
    3. The Push Client then gives the URI to the app.
    4. Your app then sends the URI to it's own cloud service
    5. When the app's cloud service has a notification to send, it uses the notification URL to send the notification to MPNS.
    6. MPNS then routes the notification to your app.



    MPNS will provide feedback (a response code) to the app's cloud service to acknowledge that the notification has been received by MPNS and will be sent on to the device as soon as possible. MPNS doesn't provide any confirmation that the notification has actually been delivered to the device, although it can give some indication that a notification won't be sent by using a different response code. If the response code that is fed back to the app cloud service indicates a problem, it is the responsibility of the app cloud service to resend the notification.

    The response code from MPNS can give a number of different responses depending on what state MPNS believes your device to be in. I'm not going to list them all here (although if you are interested the full list is here: Push Notification Service response codes for Windows Phone). For the purposes of this article, I will focus on one area - the device connection status that MPNS can feed back to the app cloud service.

    Device Connection Status
    There are three states that MPNS can determine that your device is in.

    Connected - the device has an active connection to MPNS and can receive notifications in real time

    Temp Disconnected - the device has lost connection with MPNS. The device (more exactly the Push Client service) will try and reconnect to MPNS as soon as a working internet connection exists. In the Temp Disconnected state, up to 30 notifications are queued for up to 24 hours.

    Disconnected - After 24 hours in Temp Disconnected, MPNS will change the device status to Disconnected. Once MPNS has decided that your device is disconnected, it will discard all notifications in the queue and not queue any more until the device reconnects. It's still possible for the Push Client service on the device to reconnect to MPNS once internet connectivity is restored, but only notifications sent after connectivity is restored will be sent.

    Temp Disconnected is an important state to understand. It is a perfectly valid state for a device to be in, for a variety of reasons:


    • Battery Saver is on
    • You have exceeded your carrier's data plan limits
    • Data Sense is enabled and you have exceeded your specified limit



    There are also some reasons that are less obvious:


    • Corporate wifi networks (and public hotspots) can have firewalls, packet inspection devices and proxy servers that can interfere with push notifications
    • Your mobile carrier can (and will) limit how long your device is allowed to keep a data connection open on its network. Your device's Push Client service can try and prevent this but there's only so much that can be done. There are a lot of factors that can influence this but it will certainly depend on how busy your local cell tower is.
    • Poor coverage, intermittent coverage, or frequent transitions between data and wifi is making your connection appear unstable.



    I think my notifications are broken.... what can I do?
    As we've seen in the article above, there's quite a few factors involved with push notifications. So diagnosing problems with them is tricky, and it's hard to come up with a definitive list of do's and don'ts for tracking down issues. But there are a few questions to ask and a few steps you can try.

    Is battery saver off?
    Do you have a working internet connection?
    If you're a Data Sense user, are you within your usage limits?

    If the answers to all the above are yes then about the only thing you can do (short of hard-resetting your phone) is simply to power your phone off and back on again.

    If you're certain only one app is having a problem then you can uninstall it, restart your phone and then reinstall the app.

    If you're having problems with one live tile not updating, it's definitely worth unpinning the tile, restarting your phone and then re-pinning the tile.

    Particularly if only one app is having a problem, it's well worth checking the forums here in case others are having problems.

    And it's worth testing with an app that you know should generate a notification - Whatsapp (now they've finally got a version using MPNS) is really good for this.

    Conclusion
    Push notifications aren't as simple as they first appear. There are quite a few reasons why push notifications can appear to be unreliable, and a lot of those reasons are nothing to do with your phone. It's important that an app's cloud service is written to handle the responses from MPNS properly. There can be transient conditions in wifi and data networks which are not immediately apparent to you that can delay notifications, and if these conditions persist then notifications will be discarded.

    And finally....
    For some apps (Facebook in particular), the logic behind what causes a notification to be sent to the app is not always clear. From observation, it seems to me that Facebook notifications are triggered only in relation to posts that you make (so if someone else likes or comments on your post, or if you comment on someone else's post and then someone else does) or when you are tagged in photos. I get these notifications reliably and consistently. From memory the Android and iPhone versions of these apps triggered notifications for just about everything. So I am theorising that the notification logic for the Windows Phone app is different to those platforms - if you are getting notifications from Facebook for other things, please comment below.

    As with all these guides, feel free to post your comments and suggestions below. It's great to get feedback, corrections or clarifications.
    Lumia 930 | Surface Pro 3 |
  2. adhi depp's Avatar
    Member

    Posts
    2 Posts
    Global Posts
    4 Global Posts
    #2  
    Nice post,but my concern why ios push more reliable than Windows Phone.did infrastructur in Microsoft is so bad..i am using Same carrier network and Same place
    khunhorm likes this.
  3. khunhorm's Avatar
    Member

    Posts
    141 Posts
    #3  
    I was about to ask the same thing. Why ios push more reliable? Does ios push using the same method? 450 seconds!!! That's nearly 10 minutes. Any chat will not work.
  4. Haigs's Avatar
    Member

    Posts
    80 Posts
    #4  
    Nice post, it explains everything for notifications! The only problem i have is with facebook and fb chat so i am sure its not my phone's bug but Facebook/MS.
  5. ammarmalik2011's Avatar
    Banned

    Posts
    712 Posts
    Global Posts
    727 Global Posts
    #5  
    Doesn't explain why iOS and Android are so much more reliable when it comes to push notifications.
    Optimus82 likes this.
  6. Laura Knotek's Avatar

    Posts
    16,920 Posts
    Global Posts
    32,309 Global Posts
    PIN
    Email
    #6  
    Quote Originally Posted by ammarmalik2011 View Post
    Doesn't explain why iOS and Android are so much more reliable when it comes to push notifications.
    This thread was not about iOS/Android, nor was it meant to be a comparison of different platforms.
  7. ammarmalik2011's Avatar
    Banned

    Posts
    712 Posts
    Global Posts
    727 Global Posts
    #7  
    Quote Originally Posted by Laura Knotek View Post
    This thread was not about iOS/Android, nor was it meant to be a comparison of different platforms.
    Not about iOS and Android, but about different platforms? Contradicting much? Anyway, regardless of what the thread is about it talks about push notifications and I think a lot of us would love to know the reason behind why they're so wonky on Windows Phone.
  8. Haigs's Avatar
    Member

    Posts
    80 Posts
    #8  
    This worked for me, when some tiles stopped updating.

    Is battery saver off?
    Do you have a working internet connection?
    If you're a Data Sense user, are you within your usage limits?


    If the answers to all the above are yes then about the only thing you can do (short of hard-resetting your phone) is simply to power your phone off and back on again.
    Jasy7 likes this.
  9. trickym81's Avatar
    Member

    Posts
    143 Posts
    Global Posts
    199 Global Posts
    #9  
    For Facebook, I can get notifications for wall posts, comments, etc. but I never get them for new messages (which is the only thing I actually want them for.) All Facebook notifications work perfectly fine on my Android tablet.
  10. #10  
    My push work UST for things like games. Its strange... I downloaded wechat and everything was ok but then 2 hours later push stopped working
  11. t0n1zz's Avatar
    Member

    Posts
    31 Posts
    #11  
    well in my case every social notification in my lumia 820 is not working anymore like whatsapp,line,wechat,facebook beta, metweets(twitter) and even i can't receive any message from facebook chat or family room, already have this issue for a month (because waiting for amber update but the result today is nothing different). so i get very frustated when most of my other friends using other phone have no issue about this (from android, ios , even the old blackberry not the os 10)

    tomorrow i'm willing to do some factory reset to see if it will fixed, but it will takes sometimes(setting tiles, account, etc.)... i just hoping to know why all of these can happen?
    (already happen twice since i bought the phone and already factory reset 4 times, 2 times because my phone suddenly can't recognize any headset)
  12. mpt15's Avatar
    Member

    Posts
    1,449 Posts
    #12  
    Quote Originally Posted by t0n1zz View Post
    well in my case every social notification in my lumia 820 is not working anymore like whatsapp,line,wechat,facebook beta, metweets(twitter) and even i can't receive any message from facebook chat or family room, already have this issue for a month (because waiting for amber update but the result today is nothing different). so i get very frustated when most of my other friends using other phone have no issue about this (from android, ios , even the old blackberry not the os 10)

    tomorrow i'm willing to do some factory reset to see if it will fixed, but it will takes sometimes(setting tiles, account, etc.)... i just hoping to know why all of these can happen?
    (already happen twice since i bought the phone and already factory reset 4 times, 2 times because my phone suddenly can't recognize any headset)
    turn off battery saver,
    allow WiFi to run under lockscreen (settings > WiFi > advanced),
    allow background tasks for these apps (settings > applications > advanced)
  13. Jasy7's Avatar
    Member

    Posts
    28 Posts
    #13  
    Quote Originally Posted by Haigs View Post
    This worked for me, when some tiles stopped updating.

    Is battery saver off?
    Do you have a working internet connection?
    If you're a Data Sense user, are you within your usage limits?


    If the answers to all the above are yes then about the only thing you can do (short of hard-resetting your phone) is simply to power your phone off and back on again.
    After upgrade to amber in l720 my facebook tile was not working, I followed the steps and VOILA ! Its back on business.
  14. CamiKitti's Avatar
    Member

    Posts
    295 Posts
    #14  
    I just wish we can enable some things like push notifications (store updates) or WiFi constantly being connected when Battery Saver is on.
    I know the point of Battery Saver is to save the battery by not having those things on, but it's annoying because my phone doesn't last as long without it.
  15. enomam's Avatar
    Member

    Posts
    17 Posts
    #15  
    Is it possible that changing network locations (ie, travelling overseas, and using WiFi, or a different SIM) will cause push notifications to fail ?
    I've noticed that a lot of things that were working (like toasts, pushing applications, live tile update, find my phone ...), now are not. Are they all tied to the same resources ?

    Ta !
  16. Tiago Januario's Avatar
    Member

    Posts
    2 Posts
    #16  
    Hi,

    I have the same problem. None of notifications are working. Whatsapp, viber, linkdin, facebook, skype.
    I'm wondering why I change my IOS for WP8
  17. #17  
    I have my nexus 7 next me me and when that beeps I know I have a notification. Otherwise rely on the me tile. Most apps are very unreliable. Tried the hd7, Nokia 710, Hawai Ascend W1 now Im on the 1020. All have the same issues. Something to do with the mpns is poor. Even when I do get notifications its delayed by 2-4 mins. I remember the best device I ever had was my blackberry 8900 instant notifications. Also been on 02 H/3G AND 3 H+. ALSO WIFI ALWAYS ON MAKES NO DIFFERENCE
    Currently Use an Nokia 1020
    Own an Huawei Ascend W1
    Owned an HD7 & Nokia 710
    Was Waiting for an 2nd Gen Nokia Windows phone 8 Device
    Come on People Can't we have a new Lumia That has a SD Slot?
    http://www.youtube.com/user/Windows8PhoneFanboy
    http://flic.kr/ps/2AdVF8 - Nokia 1020 Samples
  18. drg
    drg is offline
    drg's Avatar
    Developer

    Posts
    146 Posts
    #18  
    I just implemented push notifications for chat in my app Football Ultras (its in v2 which is in Beta which should hit the store in the next day or 2 if you want to check it). I'm using Windows Azure Mobile Services and my notifications come instantly. It's unbelievable and makes me wonder why other apps like FB are terrible. I don't think it's MPNS but the web service doing the push notifications and in this case Azure is working seamlessly.
    Thanked by:
  19. #19  
    explained well. but my problem is i get notifications only for whatsapp and twitter properly. all others are rrally not working. i used to get notifications from skype. but now i dont
    cant reveive calls when app is npt running. hike, line, cnn etc.....
  20. neo158's Avatar
    Member

    Posts
    1,669 Posts
    Global Posts
    1,755 Global Posts
    #20  
    Quote Originally Posted by ammarmalik2011 View Post
    Not about iOS and Android, but about different platforms? Contradicting much? Anyway, regardless of what the thread is about it talks about push notifications and I think a lot of us would love to know the reason behind why they're so wonky on Windows Phone.
    Not a contradiction, read the post again. She said "...nor was it meant to be a comparison of different platforms." The keyword there is in bold.
    There is no "best smartphone", just the one that's best for you.

    BBM: 7D2C190F
    Ashhar Hasan likes this.
  21. rahul_gct's Avatar
    Member

    Posts
    1 Posts
    #21  
    nice explanation about push notification in wp8, can you please explain how can i integrate with chat application
  22. crise's Avatar
    Member

    Posts
    375 Posts
    #22  
    Nice story, but MS really needs to improve notifications. It works unreliable for everybody. Very frustrating.
  23. #23  
    Quote Originally Posted by crise View Post
    Nice story, but MS really needs to improve notifications. It works unreliable for everybody. Very frustrating.
    Not everbody. Have no problems here since always (Lumia 820 and now Lumia 925).

    I think this post explain a lot about how fix bad notification issue.
    Ashhar Hasan likes this.
  24. Ashhar Hasan's Avatar
    Member

    Posts
    486 Posts
    #24  
    capture.png

    This is maybe what's happening with some of the apps.
    Please click on "Thanks" if you think my answer helped you.Using WP since Jan 2014. LUMIA 520. Please click on "Thanks" if you think my answer helped you.
    Rodrigo Mendes likes this.
  25. #25  
    Quote Originally Posted by Ashhar Hasan View Post
    Click image for larger version. 

Name:	Capture.PNG 
Views:	16 
Size:	19.8 KB 
ID:	60844

    This is maybe what's happening with some of the apps.

    Very good! And where did you get this? Really good stuff.
Page 1 of 2 12 LastLast

Posting Permissions