Status Widget for Facebook now supports Facebook Places

UPDATE 2012-12-01: now using typeof for bada version detection.

With the newest update to version 1.5 Status Widget for Facebook now enables you to add your current location to your Facebook post. Left to the status input box, there is now a button providing access to a screen that allows you to query places around you.

The widget still runs on bada 2.0 and older bada 1.2/1.0 firmwares with WVGA resolution, including Wave I, II and 3. The smaller waves will receive an update soon.

Technically, I had to solve the problem that the older 1.x firmwares are exposing location with a BONDI API while the 2.0 firmware uses the WAC framework. Given that, my first idea was to limit the updates to devices running with 2.0. Unfortunately Samsung does not allow limiting updates to a newer hardware. Their Q&A team told me to delete the current version and let all my users buy the app again:

If you want to change API of application, you should delete the application and then re-select the API. (sic)

Alternatively, I could tell my users „not to download“ the update if their using 1.x. But how to tell my users what version their using? Especially since I do not consider people buying bada hardware being smartphone experts…
To not screw a majority of my users (those that did not yet update to bada 2.0), I finally came up with a solution that’s specifically targeting the different APIs.
First, I query the current bada version:

function getBadaVersion() {
    if (typeof bondi === "undefined") {
        return 2;
    } else {
        return 1;
    }
}

Though the BONDI API has methods to get the exact OS version, it returns a static 1.0 so that’s what I am doing if the API is present. As the „bondi“ namespace is not available on bada 2.0 devices, I simply return „2“ in that case.
Then according to the result I decide which location API to use:

if (badaVersion == 1) {
    bondi.geolocation.getCurrentPosition(geoSuccess, geoError, { timeout: -1 });
} else {
    navigator.geolocation.getCurrentPosition(geoSuccess, geoError);
}

My second problem was what to write in the widget’s config.xml file. My solution of putting the WAC feature into config is not compatible with Samsung’s Widget SDK so I had to manually unzip the widget to change the config file:

<feature name="http://bondi.omtp.org/api/geolocation.position" required="false"/>
<feature name="http://www.w3.org/TR/geolocation-API/" required="false"/>

Make sure both are set to „false“, otherwise the W3C-enabled widget doesn’t install on BONDI devices and vice-versa. Of course setting both to false theoretically also allows to install them on devices without location features. However currently there is none such bada device without location sensors. Oh, and I added a comment to the config.xml to clarify that I’m using the BONDI API only in case the widget runs on bada 1.x devices. Samsung once withdrew all BONDI widgets from the appstore.

I uploaded my widget on Monday, October 29th. It was accepted one week later on Monday, November 5th and was available at SamsungApps the following day. Here’s a short summary about Samsung testing my widget (I am able to provide these figures as my widget needs to touch my server running on Google’s AppEngine):

date (GMT) location of IP address testing device and firmware (# of tries)
2012-10-31 2:37AM Samsung HQ, Seoul/Gangnam SAMSUNG-GT-S8600/S8600XXLC3; U; Bada/2.0
2012-10-31 7:58AM Turkey SAMSUNG-GT-S8600/S8600JVKK4; U; Bada/2.0 (2x)
2012-10-31 10:21AM Belgium SAMSUNG-GT-S8600/S8600XWKL1; U; Bada/2.0
2012-10-31 11:02AM Ukraine SAMSUNG-GT-S8600/S8600XXLD1; U; Bada/2.0
2012-10-31 11:13AM Moscow SAMSUNG-GT-S8600/S8600XXKK7; U; Bada/2.0 (2x)
2012-10-31 12:38PM Portugal SAMSUNG-GT-S8600/S8600XXKL1; U; Bada/2.0 (3x)
2012-10-31 13:31PM Israel SAMSUNG-GT-S8530/S8530BJJKC1; U; Bada/1.2 (6x)
2012-10-31 7:36PM Canada SAMSUNG-GT-S8500M/S8500MUGJF5; U; Bada/1.0
2012-11-01 2:43AM Malaysia SAMSUNG-GT-S8600/1.0; U; Bada/2.0 (6x)
2012-11-01 6:20AM Norway SAMSUNG-GT-S8600/S8600XXLA1; U; Bada/2.0 (2x)
2012-11-01 7:33AM Singapore SAMSUNG-GT-S8600/1.0; U; Bada/2.0 (2x)
2012-11-01 8:12AM Jakarta, Indonesia SAMSUNG-GT-S8530/1.0; U; Bada/2.0 (3x)
2012-11-01 9:56AM New Delhi SAMSUNG-GT-S8500/S8500DDJI2; U; Bada/1.0 (3x)
2012-11-01 12:38PM Serbia SAMSUNG-GT-S8500/S8500XXLA1; U; Bada/2.0
2012-11-01 2:27PM Brasil SAMSUNG-GT-S8530B/1.0; U; Bada/1.2
2012-11-02 4:02AM Samsung HQ/Gangnam SAMSUNG-GT-S8600/1.0; U; Bada/2.0 (6x)
2012-11-02 2:49PM UK SAMSUNG-GT-S8500/S8500XXKE1; U; Bada/1.2
2012-11-03 7:16AM Vietnam SAMSUNG-GT-S8600/1.0; U; Bada/2.0 (13x)

The screenshots in the appstore are still showing the old version of the widget. I wrote Samsung today. They continued their tradition of not answering to my question but just replying with a random answer.
See here’s my question:

The pictures in the store are still from the old version, only the text is updated.

Their answer:

Regarding your inquiry, we would like to inform you that you could change the icon since Status Widget for Facebook is now in For Sale status. Please go to Applications>My Applications>For Sale, select Status Widget for Facebook, click „edit“, in the top right corner to edit the information. At the 2nd step Display Information/ Icon section, you can edit the information.

The application update procedure is the same as the registration procedure. Until your new icon is approved, your old icon will be displayed in Samsung App Store.

That’s what happens when your support team is outsourced to Bratislava while all the technical guys are centralized in Seoul… Hope they fix the screenshots soon.