Skip to content Skip to sidebar Skip to footer

Enable Android Bluetooth From Documentation

I am trying to get my Activity to enable Bluetooth with the Android 2.0.1 SDK, I am using some code straight from the documentation here: http://developer.android.com/guide/topics/

Solution 1:

The REQUEST_ENABLE_BT part is a request code that you should handle in your onActivityResult method. In that method you'll be notified whether or not enabling Bluetooth was successful.

In that code snippet they didn't show the definition of it, but it's just a constant integer so you can set it to any value you like.

See the documentation for startActivityForResult for more info about getting results back from activity launches.

Post a Comment for "Enable Android Bluetooth From Documentation"