0

I've found this code to call Pairing Dialog:

Method createBondMethod = Class.forName("android.bluetooth.BluetoothDevice").getMethod("createBond");
createBondMethod.invoke(btDevice);

Can anyone explain, why reflection is used?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2548538
  • 869
  • 1
  • 8
  • 14

0 Answers0