Sam
Sam

Reputation: 11

bluetooth chat only works with android sdk 3.0?

As one of my first Android projects I downloaded Bluetooth Chat sample code from

http://developer.android.com/resources/samples/BluetoothChat/index.html

and tried to build it. It seems I can only build the project with Android SDK 3.0 - when using SDK 2.2 there were compile time errors, certain classes were not found.

I am wondering if there is a version of Bluetooth Chat that is compatible with 2.2? The reason I'm asking is that my dev phone is running Android 2.2 (Tmobile Comet), and the apk built with 3.0 crashes on my dev phone.

Upvotes: 1

Views: 4920

Answers (2)

John Leehey
John Leehey

Reputation: 22240

The BluetoothChat application here specifies an API level of 6 in the AndroidManifest. It is meant to be run on Android versions 2.0.1 and higher.

Make sure that you have downloaded at least the API 6 documentation and tools from Google if you are just running the BluetoothChat application directly.

EDIT:

It looks like the android site has updated code to use API 11 classes... not sure why. Here's an old version of BluetoothChat.java I found on google code.

Upvotes: 0

ge0rg
ge0rg

Reputation: 1853

The SDK contains samples for different API versions. You can download the BluetoothChat app for Android 2.2 using the SDK Manager by selecting the "Samples for SDK API 8". After downloading, you will find it in samples/android-8/BluetoothChat in the SDK directory.

Upvotes: 3

Related Questions