• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Bluetooth Speed...

Hi,

I've been writing a small test project that (to cut a long story short) needs to send quite small images from a Windows PC to an Android device over Bluetooth. This works - but the speed is horrible.

I'm using a Bluetooth server socket on the droid, and (in a separate thread) a loop which queries how much (if any) data is available and reads it into the buffer at a set position.
E.g. InputStream.read(buffer, position, InputStream.available()) etc.
Then if the active data in the buffer is above a certain number of bytes, a handler is called and the main thread decodes the image from the buffer.

A 3KB image is taking about 4 seconds. That seems slow to me, so I'm trying to figure out where the bottleneck is. I guess it *could* be at the pc end but I'm wondering if anyone has a theory if anything is wrong at the Android end? And whether anyone has written an app (using RFCOMM/SPP sockets) which is running significantly faster?

Cheers.
 
Back
Top Bottom