Question

On the Kindle Fire, as there is no Bluetooth, according to the Android documentation (at http://developer.android.com/guide/topics/wireless/bluetooth.html), if a developer calls 'getDefaultAdapter()', it should return null. However, the Kindle Fire doesn't return null in such a case. I thought that maybe if I then called 'getAddress()' that that might work. It works on some devices but on others, 'getAddress()' may return null if the Bluetooth hasn't been enabled so that doesn't work either. I found this guy: http://groups.google.com/group/Android-developers/browse_thread/thread/fcb2e20713c6795c but doesn't seem like anyone has offered a solution.

For now, I'm checking if either the Bluetooth adapter is null or if the device model is 'Kindle Fire' but I really don't want to do this and would definitely prefer a more general solution. Anyone have any ideas?

Was it helpful?

Solution

Try hasSystemFeature("android.hardware.bluetooth"), called on PackageManager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top