2

I've created a simple application to scan for BLE devices using the Samsung BLE SDK http://developer.samsung.com/ble# following the hints guide:

public void onCreate() { 
   if (mBtAdapter == null) { 
      mBtAdapter = BluetoothAdapter.getDefaultAdapter(); 
      if (mBtAdapter == null) return; 
   } 
   BluetoothGattAdapter.getProfileProxy(this, mProfileServiceListener, BluetoothGattAdapter.GATT); 
. 
. 
. 
private BluetoothProfile.ServiceListener mProfileServiceListener = new BluetoothProfile.ServiceListener() { 
   public void onServiceConnected(int profile, BluetoothProfile proxy) { 
      if (profile == BluetoothGattAdapter.GATT) { 
         mBluetoothGatt = (BluetoothGatt) proxy; 
         mBluetoothGatt.registerApp(mGattCallbacks); 
      }
   }
}

Then calling

mBluetoothGatt.startScan();

on a button press.

When I run the application on the Gear, everything gets instantiated correctly but the callback

  onScanResult(BluetoothDevice device, int rssi, byte[] scanRecord)

Never gets called. When I run the application on a Samsung GT-N5110 Tablet everything works great and I can see all of the devices in the area.

Any ideas why this wouldn't work on the Gear?

tomrozb
  • 25,773
  • 31
  • 101
  • 122
Michael
  • 703
  • 1
  • 5
  • 11

0 Answers0