In general, the examples and hints found here, in the SDK and on
StackOverflow will get you far.

My experience is:
1: You probably want to target only Android 2.2 (or higher). As far as
I recall, SPP was not supported before 2.1 (2.0.1?), but the versions
before 2.2. had various quirks that you need to hack around. BT in 2.2
works as advertised.
2: Beware that Android will not connect to devices that are set up to
not require pairing. This is probably for security reasons, but is a
pain IRL....
3: If you're building on the BluetoothChat example, beware that the
UUID used there is specific to that app, and will not work with SPP
services in general. Google for UUID and SPP.
4: Expect some iterations getting it to work. I've pulled quite a few
hairs on getting automatic reconnection to work (hint: ensure that
everything is properly closed down in the right order).
5: Log extensively to understand what's happening...

Have fun :)
/Per

On 25 Sep., 00:34, Nathan <[email protected]> wrote:
> I may be doing some Bluetooth Serial Port programming work for a
> client and I'm just looking for some tips in determining complexity/
> workload.
> The work is similar to reading from a bluetooth GPS (not making the
> phone a bluetooth GPS), but it is some custom hardware, so not
> exact.
>
> Here's what (I think) I know so far:
> I will need to pair devices with a Serial Port Profile.
> I need to connect using a BluetoothSocket which works on Android 2x
> -I don't know yet if the Android I will be a server or a client in
> this scenario.
> I will open an InputStream (no outputstream needed) and have a thread
> continually blocking for input
> I believe "BluetoothChat" is the best example to start with.
>
> What I would want to know.
> - Are there devices/manufacturers who block the bluetooth serial port,
> trying to block tethering or something like that?
>    (-I've seen posts here that imply that, but I don't see a bunch of
> comments like "Doesn't work on my @#$$" in Bluetooth GPS Providers in
> the market).
> -Are there going to be hardware specific oddities, or can I develop
> with my Nexus One and just hope it works on everything else?
> -Is pairing something that will require a lot of education for the
> users, and would a good app try to initiate this inside their app, or
> just assume it is already done.
> -Is Bluetooth programming going to be my worst nightmare, like it
> sometimes was on Windows Mobile, or smoother than I could ever hope?
>
> Thanks
>
> Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to