Created
December 24, 2019 10:47
-
-
Save sidishere/1d2606e476eba45f09f3c794c96fe41a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void doDiscovery() { | |
Log.d("TAG", "doDiscovery()"); | |
// Indicate scanning in the title | |
setProgressBarIndeterminateVisibility(true); | |
setTitle("discovering new devices"); | |
// Turn on sub-title for new devices | |
findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE); | |
// If we're already discovering, stop it | |
if (bluetoothAdapter.isDiscovering()) { | |
bluetoothAdapter.cancelDiscovery(); | |
} | |
// Request discover from BluetoothAdapter | |
bluetoothAdapter.startDiscovery(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment