Greeting ,
最近在調用 Bluetooth Hide API 時,有些 API 會出現 NoSuchMethodException 的錯誤
例如:
m_getServiceChannel = blueToothDevice.getClass().getMethod("getServiceChannel");
我想要調用隱藏的 getServiceChannel 但是會出現 NoSuchMethodException 的錯誤,
相同的方法,我調用 createRfcommSocket 則是正常,例如:
Method m = blueToothDevice.getClass().getMethod("createRfcommSocket", new Class[] { int.class });
sock = (BluetoothSocket)m.invoke(blueToothDevice, Integer.valueOf(1));
請問是不是我調用 getServiceChannel 的方式不對呢?