Bluetoothchat [message #1046275] |
Sun, 21 April 2013 13:30  |
Eclipse User |
|
|
|
Hi guys,
I'm a newcomer n got some newcomwer problems.
By now I'm using Eclipse Helios and trying to launch BluetoothChat sample app on the android emulator.
I'm turnning the "bluetooth on" on the emulator setting and still got the "Bluetooth is not available" message when launching the app.
Looked into code and found this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(D) Log.e(TAG, "+++ ON CREATE +++");
// Set up the window layout
setContentView(R.layout.main);
// Get local Bluetooth adapter
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
// If the adapter is null, then Bluetooth is not supported
if (mBluetoothAdapter == null) {
Toast.makeText(this, "Bluetooth is not available", Toast.LENGTH_LONG).show();
finish();
return;
}
}
Well, mBluetoothAdapter is allways NULL.
Tried it under UNO got same results.
1. What can be the reason for that?
2. How can I install the BluetoothChat on my Android machin (Galaxy s6500) running Android 2.3.6?
Thanks all,
Sol
|
|
|
|
Powered by
FUDForum. Page generated in 0.09395 seconds