callback/callback-blackberry — Issue #1: navigator.network.connection.getInfo returns wrong parameter to callback
Author: filmaj
Created: 2011-11-07 23:06:02+00:00
State: open

The blackberry implementation returns a JSON object to the getInfo success callback.

Android, for example, returns just a string.

Which one is the right one? I can't tell from the callback-test repo.

Here's an example of a problem I have currently on an Android and BlackBerry callback project:

```
navigator.network.connection.getInfo(
function(type)
{
if(type == "none" || (typeof type.type != 'undefined' && type.type == 'none'))
{
alert('no connection');
}
else
{
alert('connectioN!');
}
},
function()
{
alert('something bad happened');
});
```

So the `getInfo` callback, in Android case, compares to a string; BlackBerry has to check it's an object and look at one of the object properties.