Nokia 5800

Nokia 5800

Is Symbian going to make it on mobile devices? I’ve used java a long time now and hoped the fragmentation would be sorted out for by now. My first experience with S60 was pretty shocking. Sun’s SDK for wireless devices is actually really good, but runs on the emulator generally won’t on the actual device. It is a very slow and painful debugging process to test on emulator, then create a SIS (or jar files) and upload to the phone, run it and watch it crash. No way to know were or why, and you need to get the stack trace yourself (display on a Form, or send to a file etc). Ugly, and in many devices the standard Bluetooth API (JSR82) will fail to connect because the phone’s firmware is locked. Pretty bad news for a developer trying to sell innovative apps.

Now, The fragmentation is in both directions. More handsets and new code tools all the time. Python is better at some of the portability and debugging. It is very easy to use a Bluetooth Console to execute commands directly on the device. But not all devices are supporting Python. Flash and Brew on devices also seemed promising. Brew bundles the billing/purchase and digital signing right into each app. Seems like a good idea for developers, but has been buggy and does limit how you can deploy your application. Now don’t forget JavaScript. JavaScript has done well and is on many platforms and almost every web browser. iPhone heavily leverages JavaScript and has shunned Flash and JVM’s despite the rumors of Apple supporting both soon. So, pick a device and one or two code tools? Not an easy thing to do because you also need to consider what App Store is going to get you into the market.

(not even going to talk about C/C++ because it just needs to die. in my opinion, only the firmware for each phone should be native. Note that much of Nokia’s SDK required elaborate configuration to write even simple apps for S60)

For many of these reasons I would strongly suggest phone gap. They have an Open Source Project to try to address these problems and are going to do well just because developers need to be able to churn out apps quickly. No bluetooth support yet, but watch out for it.

Now, what about all my Java code I have thus far? Well, Nokia isn’t totally asleep at the wheel, it just seems like it. But they have updated their Java Runtime for S60 to version 2.0. It is way better and solved many of platform issues on my Nokia 5800.

Worth watching out for is an Open Source Os called MAEMO. If this project replaces all the Nokia legacy stuff and gets traction.. They might be able to get in the game. Seeing how Android does on some of the lower end phones will tell the tale. Android has a way better App Store and a great Eclipse plug in. Looks like a horse race, place your bets.

, , , , , , , ,

ok, few links to errors I’m seeing thus far:

Future Exception is a new one! This error only started after I re-flashed my Nokia 5800 with version 21 of the firmware.

I used to get further, the URL was discovered from the service search and I’d even get asked for permission to connect… and then get This error

Again, my code is freely available to test your connection issues, but here is a snip. Notice that the URL is false for master, encrypt and for authenticate. This code is actually part of the ZephyrOpen Project for PC and MAC, but being JSR-82, this is supposed to work on the cell phones too.. and it does, just need a Black Berry 8100, that junk phone has never let me down with Devopment tools. Too bad it has no WIFI, could be used as a BT to WIFI bridge.

why does Word Press Mangle this code?

/**
* Find and attach to serial port profile for this device
*
* @return true if connection was established, false if not
*/
public boolean connect() {

if( ! findService()) {
constants.error(“can’t find serial port service on ” + getBluetoothAddress(), this);
return false;
}

try {

constants.info( “url = ” + serviceURL, this);

/** open the serial port streams */
connection = (StreamConnection) Connector.open(serviceURL);
inputStream = connection.openDataInputStream();
outputStream = connection.openDataOutputStream();

} catch (Exception e) {
constants.error(“connect(): ” + e.getMessage(), this);
return false;
}

/** all is well, streams open */
return true;
}

/** @return true if target device was found */
private boolean findService() {

constants.info(“Searching for SPP ” + getBluetoothAddress(), this);
serviceSearch = true;

/** Serial Port Profile UUID */
int[] attributes = { 0×100 };
UUID[] uuids = {com.intel.bluetooth.BluetoothConsts.RFCOMM_PROTOCOL_UUID};

/** look for serial port service */
int serviceSearchID = 0;
try {

serviceSearchID =
agent.searchServices(attributes, uuids, this, this);

/** spin lock */
while (serviceSearch) Thread.sleep(DELAY);

} catch (Exception e) {
agent.cancelServiceSearch(serviceSearchID);
return false;
}

/** found target serial port profile ? */
if( serviceURL == null ) return false;
else return true;
}

/** found a service on this device */
public void servicesDiscovered(int arg0, ServiceRecord[] servRecord) {
for (int i = 0; i < servRecord.length; i++) {

DataElement nameElement = (DataElement) servRecord[i].getAttributeValue(0×100);
if ((nameElement != null)
&& (nameElement.getDataType() == DataElement.STRING)) {

/** retrieve the name of the service */
String name = (String) nameElement.getValue();

if (name.equals(“Bluetooth Serial Port”)) {
serviceURL = servRecord[i].getConnectionURL(
ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
serviceSearch = false;
}
}
}
}

, , , , , ,

PyS60 now installs without errors on the Nokia 5800

Posted using ShareThis

, , ,