So I tried a third device, and finally got a trace out of Logcat.
It says I don't have the right permissions, but I did put them
into my manifest in the same place as all of my other permissions:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
I'm not sure how else to make sure I have the right permissions.
Thanks,
Toby
On 02/13/2014 03:31 PM, Tobiah wrote:
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 [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
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.