Tobiah
2014-02-13 23:31:13 UTC
I'm going through the Bluetooth docs and right off I
am having a problem. The code below is cut right from
http://developer.android.com/guide/topics/connectivity/bluetooth.html
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
I'm setting REQUEST_ENABLE_BT to an arbitrary integer.
I tried running this on two devices, starting with
bluetooth off. On the tablet, the app crashes when checking
mBluetoothAdapter.isEnables(). On my Galaxy note 3, it
makes it past that check, but then the app crashes when
startActivityForResult() is called.
There is no output in the Logcat in either case.
Thanks for any help!
Tobiah
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
am having a problem. The code below is cut right from
http://developer.android.com/guide/topics/connectivity/bluetooth.html
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
I'm setting REQUEST_ENABLE_BT to an arbitrary integer.
I tried running this on two devices, starting with
bluetooth off. On the tablet, the app crashes when checking
mBluetoothAdapter.isEnables(). On my Galaxy note 3, it
makes it past that check, but then the app crashes when
startActivityForResult() is called.
There is no output in the Logcat in either case.
Thanks for any help!
Tobiah
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.