Commit a6354fd1 authored by y0no's avatar y0no
Browse files

Handle adapter activation time

parent b0018262
......@@ -41,9 +41,15 @@ public class BtScanner {
} else {
Log.d(TAG, m_oAdapter.getName());
}
enableAdapter();
while(!m_oAdapter.isEnabled()) {}
m_oScanner = m_oAdapter.getBluetoothLeScanner();
if (m_oScanner == null) {
m_oStatus.setText("Unable to get LE Scanner");
Log.d(TAG, "Unable to get LE Scanner");
} else {
Log.d(TAG, m_oScanner.toString());
}
m_oDetectedDevices = new HashMap<String, DeviceInfo>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment