BtFree v1.0

Hi,
BtFree v1.0 is now ready to download.
BtFree is an opensource library for creating client-server application over a Bluetooth connection.
Upon the JSR82 it has been created a simple API for creating Bluetooth application, without direct manipulation of Bluetooth API and its problem.
It has been tested with different phones JSR82 compliant and iwth avetanaBluetooth.
The homepage is http://btfree.javastaff.com
There is also an example of a game that use this library, the game of scissors,rock and paper over Bluetooth :slight_smile:
Comments are welcome.

Federico Paparoni

Alot of the links on the website - including the Javadocs - are broken.

There are also pretty blatent bugs in parts of your code.

com.javastaff.btfree.BlueMSG.setMess(String)

Is fundamentally broken.
Also, I see no reason for abbreviating the method name.

com.javastaff.btfree.BlueMSG constructor

Uses String.getBytes(). This uses the default character encoding on the device.
However, if you are transmitting to a device with a different default character encoding, your message will likely become damaged or corrupt.

com.javastaff.btfree.ConnectionManager.createStreams()

Contains a potencial Memory leak (unclosed InputStream) - and I also disgree with your boolean flag for indicating success.
Exceptions exist explicitly for this purpose - and infact, the above bug wouldn’t exist if you had used Exceptions in the way they were intended.

com.javastaff.btfree.PublisherServerImpl constructor

Will throw a NullPointerException if an error occurs during the Publisher constructor.
This is uninformative to the programmer, and is again caused by your catching and not rethrowing of low level errors.

This was from a quick skim of the code, doubtless there are other problems in the API - I suggest you spend some more time testing it in a real coding scenario.
Each time you have to refer back to the source code of the API to deduce what is going wrong, think why that is - and how you can fix the design to avoid this step.

Oh, and your naming convention is abit sucky in places =)

Wrong, it works

It’snt broken, abbreviating is my personal decision…

In fact this is an implementation of the interface MSG, however i could test it only with a few types of phones (there arent so much JSR82 phones).

This is an opensource library, made by only one person, not an enterprise application for IBM. Be quiet :slight_smile:
Testing this short library was good, so i decide to publish it. If you have comments/improvements or everything else join the project :slight_smile:

Doc, you might consider taking the advise that Abuse has given you and not just discard them as it was some form of personal critisism. He has given some of his time to go through the source code and from his knowledge and background found a few thing to improve. I am not saying that everything he says may be correct as I don’t have looked in to it. But anyway don’t discard advises from others directly. You made this and made it open source, of course people will come to you with suggestions. Learn to handle it.

And never never catch and throw another exception. Instead of making a defence speech of “This is an opensource library, made by only one person, not an enterprise application for IBM.” say “Sure I am aware of this but this initial version isn’t made for production use yet, I have this planed for version X”. Learn to work with a community instead of against.

You are right. I understand the way that Abuse told me this advice. Probably my not perfect enligh does’t help me telling that now it is a simple library. My only thought was that Abuse have seen the source code and the library itself too fast, without testing it.
Now i’m using it i in a little project but i publish it to find other people that like/help me in develop :slight_smile: