For an app to be able to stay in the background using the audio api it must first be launched. Push notifications don't require the app to be launched(except once so it can register to the MPNS). On iphone they can stay in background once launched unless user kills it(same on android). On wp8 even with audio bg hack their app might get killed since I can start listening to music and thus kill their app. So they need a fallback. So I guess that their use of push notifications when the app is not in bg is their fallback strategy.
That is what I think as well. They do already have the ability to use push if the need arises (their open channel is terminated) as can be concluded from the test results of when the audio API is not running.
Let's use Skype, mail and whatsapp as comparison. You do not have an active TCP/IP connection for email. You receive push notifications and then open the app and the app downloads the mails. In the UI you see that the mail is not there yet it is downloading and will appear later. But in a sense you are always online when using mail. Let's look at Skype. It's based on a similar principle even though it is a IM app. You receive the notifications that someone wrote to you. One line of text 10 lines it does not matter. You press that toast or open the app and the lines of texts are not there. They are downloading and will get there once the download finishes. You close Skype but you still appear online. Just like in the email case. Because you use push and don't rely on an open active TCP/IP connection(let's call it channel) you can't know if you are online or not and it's simpler to assume that you are online. Mail not being used as an IM it does not have an online/offline indicator. IM do need this. So this is why you always appear online on Skype even after closing the app because it acts just like email. You need to switch account and thus signaling the server that you are going offline.
In whatsapp case thing function a little different. By keeping that channel open(by streaming music) they know when you are online when you go offline and can grab data faster because the channel is already open and data goes through it.
Yes that seems to be exactly be the case like you said. I tested Whatsapp again and funnily enough, its user perceivable. When they use "push" (without audio API), you get notified of the message but the sending party only sees the messages as sent and not delivered. They not appear as delivered until the recipient open his app and the app downloads them from server.
When they use any other means (Data or WiFi once Audio API is active), the sender sees them as delivered almost instantly even though recipient has not yet opened and seen his app.
I noticed this during testing because I was the one sending and receiving (from separate devices and accounts obviously).
However, when I switch to test, Whatsapp often disables the API (I shall test more to see what exact conditions are needed for this to happen)
On iphone (at least ios 4.0) whatsapp does not receive push notifications. You have to open the app and not close it so you can receive messages. This is because even there the whatsapp keeps the channel open and communicates through it so unless you open the app there is no channel so no notifications no messages.
But when you have 2 platforms were you keep the channel open you won't change your app just for windows phone platform. You won't care given it's market share. So you will ask for more "open API" from MS. I just hope that in 2 years such apps could be banned from store no matter their name.
I'd have to disagree there.
To clairfy, you're saying that on iOS4 and below, Whatsapp cannot receive messages unless it is the active and currently used app or did I misunderstand? From memory (I don't have an iOS4 device anymore), it used to work just fine even if the app is suspended or not active. Currently, it works with push on iOS as well. I really doubt it is keeping a connection alive on iOS.
Again from memory, Whatsapp was always able to push on iPhone which is part of the reason why it became so popular there (you din't have to stay logged in and active like some other IM apps)
I cannot comment on Android because I have no tested it enough to verify whether or not it is keeping a background agent (Service) alive there - which very well could be the case coz messages sent to a connected Android device seem to show up as delivered right away.
However they do have another massive platform which doesn't allow them to keep the connection alive - S40. Cheap Nokias are almost their core user base.
I think Android, BB10, BB7/6, Symbian all allow them to keep the connection alive whereas WP and iPhone don't (there are other small indicators for this too, on WP and iPhone, the name used to notify you is the one stored in your device but on WP and iPhone, its the name that the user set on his profile for "push" messages)
I'll go back and test some more (which cases it uses push and which cases it rides the open network)
Would love to hear more details