You were doing some thing like thi and doesn't work?
BluetoothAdapter.getDefaultAdapter().enable();
Remeber that you need the android.Manifest.permission.BLUETOOTH_ADMIN
permission.
Sometimes Bluez fails to start it the first time, you can try to enable
after some delay, it should end up working.
private final Runnable mBluetoothEnabler = new Runnable() {
@Override
public void run() {
if (!mBluetoothAdapter.isEnabled()) {
if (!mBluetoothAdapter.enable()) {
mHandler.postDelayed(mBluetoothEnabler, 200L);
}
} else {
onBluetoothEnabled();
}
}
};
Quarta-feira, 13 de Junho de 2012 9:20:53 UTC+1, İsacan Akkoca escreveu:
>
> Hi everyone,
> I want open bluetooth from my application but i didn't open. Can you show
> how to work this?
>
--
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