Messaging apps unreliable due to WP's broken WiFi connectivity design (Audio API not Whatsapp fault)

ah06

New member
Dec 15, 2012
89
0
0
Visit site
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
 

ah06

New member
Dec 15, 2012
89
0
0
Visit site
Your point, and this thread, is moot.

No, your use case (while logical) does not apply to millions in the developing world and the majority of Whatsapps users.

Why is this thread still open.

We're onto something clearly. I respectfully ask you not to engage any further if you still fail to see that there are some valid points. You're not adding anything
 

ah06

New member
Dec 15, 2012
89
0
0
Visit site
I must mention that after each time I exit whatsapp, I go over to start a song so that I can kill whatsapp audio api, and I still get notifications afterwards.

Which means they can use Push, just like any other apps. So the argument that they use the Audio API is being used because they don't want to use push is incorrect.

However, ChMar may still be onto something with the suggestion that they only do this as a fallback. I'll test some more scenarios and he will probably post here as well and we can probably have the actual reasons then.

Home with data on - receive notifications from whatsapp
Home with wi-fi on and data on - receive notifications from whatsapp
Roaming (so no data connection) and wi-fi on - receive notification from whatsapp
Roaming no wi-fi - obviously no pushing service.

Yep, you along with millions of others in developed countries and/or with data plans do not benefit at all from the Audio API since your WiFi is on anyway when you're in range and you have Data always on otherwise. Most of the discussion only really is relevant to the bulk of Whatsapps userbase who operate without any data (and who maybe of WP7 or not yet have enabled the WiFi always ON feature). Failing to see that is clearly causing a lot of forum members to get aggressive :\
 

ChMar

New member
Mar 15, 2013
273
0
0
Visit site
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

Yes up to ios 4. I was jailbreaking AT&T locked phones at that time and everyone was complaining that they don't get push notifications for whatsapp unless they open it.
I haven't tested this on ios 6 but I will since I'm curios if this improved there.

iphone though lets you keep connections alive(make the app as what is called newsstand type and you can keep connections alive but you may upset the Nazi empire and have you app kicked). As for Symbian I have no idea but android, bb10, bb6+ allows for keeping connections alive.
 

travis_valkyrie

New member
Jan 3, 2012
449
0
0
Visit site
After seeing this thread re-open, might as well give it a last shot.

I tried opening and closing WhatsApp on 2 WP and 1 Android. The Audio API only shows when the app is closed on WP. When I opened all WhatsApps, they all see each other as online. But closing 1 of them one at a time returns as offline or last seen, and brings up the paused streaming, of course except android. Other IMs however does it fine without bringing up the audio API. While playing music, it won't be possible to stream at the same time. But WhatsApp still continues to push through notifications while music is on.

So question is, why does it only come up after the app is closed? What use is it for when it handles push notifications just fine when it is closed while music is still playing? If someone could grab the unencrypted xap, preferably the very first version and reverse engineer it, would be possible to track where the audio is coming from.
 

ttsoldier

Retired Ambassador
Dec 4, 2012
4,351
0
0
Visit site
Which means they can use Push, just like any other apps. So the argument that they use the Audio API is being used because they don't want to use push is incorrect.

However, ChMar may still be onto something with the suggestion that they only do this as a fallback. I'll test some more scenarios and he will probably post here as well and we can probably have the actual reasons then.



Yep, you along with millions of others in developed countries and/or with data plans do not benefit at all from the Audio API since your WiFi is on anyway when you're in range and you have Data always on otherwise. Most of the discussion only really is relevant to the bulk of Whatsapps userbase who operate without any data (and who maybe of WP7 or not yet have enabled the WiFi always ON feature). Failing to see that is clearly causing a lot of forum members to get aggressive :\

Just so you know, I am in a third world ( or if you rather call it "developing") country.

As I mentioned earlier. Serious/Heavy IMers will not rely on Wi-Fi only to IM. Why? Because Wi-Fi is not always available. If you're ok with Wi-Fi not being always available, then it would not be that important when you receive a message and you would not NEED to have instant push notifications.
 

rockstarzzz

New member
Apr 3, 2012
4,887
1
0
Visit site
Yep, you along with millions of others in developed countries and/or with data plans do not benefit at all from the Audio API since your WiFi is on anyway when you're in range and you have Data always on otherwise. Most of the discussion only really is relevant to the bulk of Whatsapps userbase who operate without any data (and who maybe of WP7 or not yet have enabled the WiFi always ON feature). Failing to see that is clearly causing a lot of forum members to get aggressive :\

Will you count London in a "developed" country? I don't have WiFi everywhere. I have to rely 100% on data connections if I want any sort of connectivity in background. Only place I have reliable WiFi is at home.

So not bulk of Whatsapp doesn't "only" rely heavily on WiFi (without data) - unless you have any reliable statistics for it to quote, this is moot. If that is something you want me to believe in, I might as well believe that Simpson is God.
 

ttsoldier

Retired Ambassador
Dec 4, 2012
4,351
0
0
Visit site
And to add to this, my country is a population of about only 1.5 million people. We do not have hotspots all over the country. So majority of users have their data package. If you cannot afford a data package, you will use Wi-Fi whenever it is available ( most of the times, at home.)
 

Florin Anghel

Banned
Jan 9, 2013
102
0
0
Visit site
Yep, you along with millions of others in developed countries and/or with data plans do not benefit at all from the Audio API since your WiFi is on anyway when you're in range and you have Data always on otherwise. Most of the discussion only really is relevant to the bulk of Whatsapps userbase who operate without any data (and who maybe of WP7 or not yet have enabled the WiFi always ON feature). Failing to see that is clearly causing a lot of forum members to get aggressive :\
I think you were wrong somewhere, because at the begining of your main post you said something that this may be happening to WP8 also.
But is not since WP8 has the Wi-Fi always on feature if you lock the phone.
Your main issue is that you have WP7 that don't have wi-fi always on, and you wish in someway it had so that whatsapp shouldn't use audio api.
Therefor you are upset on something that MS knows about but didn't fix it in WP7 because they are focusing on WP8.
I think I just wrote your issue in 2 sentences while your post was 200 sentences. If I'm wrong then I don't know what is your concern.
 

a5cent

New member
Nov 3, 2011
6,622
0
0
Visit site
Ah coz we're discussing a different thing now. We're now trying to ascertain whether Whatsapp is using it for keeping connection alive (TCP/IP) or WiFi alive. The test case is designed so that the API is not active at that moment (so we know whether or not Whatsapp can indeed use true push rather than poll system).

Okay, I still think something is fishy, but I'll hope it's just semantics.

I imagine that it shouldn't be too hard to test what the audio background task is actually doing. Maybe someone can try this (I haven't got my second phone on me, so I can't do this myself):

Preconditions (for the IM receiving device):

* Make sure the background audio task is running (launch WhatsApp and then close it again).
* Disable cellular data.
* Disable keep WiFi alive.


Action
a) Make sure RX (the receiving device) is active (display on).
b) Send RX a WhatsApp IM from TX (the sending device).
Expectation
TX notifies that the IM was delivered.
Explanation
This is just to verify that everything is working as expected on RX, and that it has an open connection to the WhatsApp server.








Continue directly with the tests. Don't open any other apps and particularly don't play any audio.

Tests:

Test 1 (is the audio background task keeping WiFi alive and maintaining an open connection to the WhatsApp server?):

Action
a) Wait until RX becomes inactive (display off).
b) Send RX a WhatsApp IM from TX.
Expectation
TX doesn't notify that the IM was delivered.
Explanation
WiFi was shut down. Since no other data connection is available, nothing is delivered to RX.
Conclusion
The background audio task is not keeping WiFi alive. Continue directly with Test 2









However, should TX unexpectedly notify that the IM was delivered, then the audio background task is keeping WiFi alive and obviously also maintaining an open connection to the WhatsApp server. No further testing is necessary. The audio background task does both.

Test 2 (is the audio background task only maintaining an open connection?):

* Enable cellular data.

Action
a) Make sure RX is active (display on).
b) Turn off your WiFi access point
c) Wait a minute or two (likely unnecessary, but just to make sure).
d) Send RX a WhatsApp IM from TX.
Expectation
TX notifies that the IM was delivered.
Explanation
WiFi was shut down, so the IM was delivered through the cellular network. Reestablishing the connection on the cellular network is what the audio background task is suspected of doing.
Conclusion
In all likelihood it is the audio background task that is re-establishing the connection to the WhatsApp server. To make absolutely certain, verify this by repeating this test as described below.













* Disable the audio background task

Repeat Test 2. If it is the audio background task that re-establishes the connection on the cellular network, then the IM will now not be delivered.
 
Last edited:

a5cent

New member
Nov 3, 2011
6,622
0
0
Visit site
Let me try and get this straight: OP is mad because Whatsapp doesn't work if you don't have a data-connection?

No. We want to understand why WhatsApp is misusing the background audio processing feature and causing excessive battery drainage. We want to understand what is actually going on.
 

Giddora

New member
Jan 14, 2012
431
0
0
Visit site
No. We want to understand why WhatsApp is misusing the background audio processing feature and causing excessive battery drainage. We want to understand what is actually going on.

To keep Wifi alive in the background on phones where the "Keep Wifi-alive"-feature isn't available.
 

a5cent

New member
Nov 3, 2011
6,622
0
0
Visit site
To keep Wifi alive in the background on phones where the "Keep Wifi-alive"-feature isn't available.

That is wrong, because the audio background task also starts up on devices where that feature IS available. At least that is what is being stated (haven't got my 920 on me ATM so can't verify).

ChMar gave an alternative explanation as to what that task is really doing, which I think makes much more sense.

I suspect my test case should clarify the issue.
 

Florin Anghel

Banned
Jan 9, 2013
102
0
0
Visit site
That is wrong, because the audio background task also starts up on devices where that feature IS available. At least that is what is being stated (haven't got my 920 on me ATM so can't verify).

ChMar gave an alternative explanation as to what that task is really doing, which I think makes much more sense.

I suspect my test case should clarify the issue.
Not wrong, at least not literally wrong. Whatsapp on WP8 uses audio api because they were lazy to remove it. Without audio api, like I said, you still get notifications on wi-fi while the phone is locked.
 

ChMar

New member
Mar 15, 2013
273
0
0
Visit site
@a5cent I'll run a battery of tests tomorrow(bed time now) using the phone and a bluestack whatsapp as the sender. And this should clarify the issues.
 

ttsoldier

Retired Ambassador
Dec 4, 2012
4,351
0
0
Visit site
That is wrong, because the audio background task also starts up on devices where that feature IS available. At least that is what is being stated (haven't got my 920 on me ATM so can't verify).

ChMar gave an alternative explanation as to what that task is really doing, which I think makes much more sense.

I suspect my test case should clarify the issue.

This is because the whatsapp team is too lazy to make a separate version for WP8 and WP7
 

a5cent

New member
Nov 3, 2011
6,622
0
0
Visit site
Not wrong, at least not literally wrong ... Without audio api, like I said, you still get notifications on wi-fi while the phone is locked.

Yes. I know. I think that statement is wrong nevertheless. If that statement is not wrong, it is at least too incomplete to be useful.

I suspect you and others aren't quite grasping all the variables at play here. I too have no more time today, but I will attempt to provide my own explanation tomorrow.

@ChMar, Thx
 

rockstarzzz

New member
Apr 3, 2012
4,887
1
0
Visit site
Yes. I know. I think that statement is wrong nevertheless. If that statement is not wrong, it is at least too incomplete to be useful.

I suspect you and others aren't quite grasping all the variables at play here. I too have no more time today, but I will attempt to provide my own explanation tomorrow.

@ChMar, Thx
I might have mmissed it but how do you propose turning off the audio api connection? Restarting phone and no opening whatsapp on RX and then sending a msg after say 20-30 minutes from TX?
 

a5cent

New member
Nov 3, 2011
6,622
0
0
Visit site
Okay, I don't know if I can explain this any better than others already have, but I'll give it a shot:

A few abbreviations:

IM > instant message
WA > WhatsApp (the app)
WAS > WhatsApp server
MPNS > Microsoft Push Notification Service (a collection of servers and WP APIs which together implement WP's standard for delivering push notifications)

On iOS and Android, WA IMs are pushed to devices through a single channel:
• via the WAS

On WP, developers are expected to use MPNS whenever they need push notification services. For whatever reason(s), the WA team decided they don't like MPNS. As a result, WP's version of WA has two channels through which it can receive data:
• via the WAS
• via MPNS

Now, depending on which channel is used, the way an IM ends up on your WP device is quite different. For now, we'll ignore all those differences. We'll also ignore the question why WA is using two channels instead of just one. The only issues I'll get into are those related to connection management:

An app that uses MPNS doesn't need to manage its own connection to the MPN servers. WP does this autonomously on behalf of any and all apps that require push services. WP ensures devices can receive push notifications from MPN servers at all times (provided a usable data link exists which isn't disabled in the settings). However, as the WA team apparently prefers their own approach, they must also manage their own connection to their WAS. Managing that connection implies noticing when a connection collapses (e.g. when moving out of range of a WiFi hotspot) and re-establishing that connection on a different data link if possible (e.g. over a cellular data link).

Obviously, any connection can collapse at any time, so connection monitoring must be a continuous process. This is what we suspect the audio background task of doing. WA can't do this without the background task, because task switching, closing WA, or the device going to sleep would interrupt the monitoring process.

Given this suspicion, we doubt that the WA owned audio background task persists solely due to developer neglect. I think the test case I wrote has a good chance of clarifying what is really going on. Has anybody been able to try?

I don't know if that makes things any clearer, but I hope so.

I might have missed it but how do you propose turning off the audio api connection? Restarting phone and no opening whatsapp on RX and then sending a msg after say 20-30 minutes from TX?

Some claim that playing audio with MS' audio player shuts down WA's audio background task. I haven't been able to verify this as I don't have my L920 with me at the moment (don't think it makes sense to test this on my L800).

However, I would do exactly what you said. Restarting the device and not launching WhatsApp is likely the safest bet.
 
Last edited:

Members online

Forum statistics

Threads
322,916
Messages
2,242,890
Members
428,004
Latest member
hetb