1

I have recently found several examples of using reflection to call methods on instances of Android's BluetoothDevice objects.(http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html)

Example: How to unpair or delete paired bluetooth device programmatically on android?

Can methods be invoked directly on the object instances? I found something in the documentation about BluetoothDevice:

"This class is really just a thin wrapper for a Bluetooth hardware address. 
Objects of this class are immutable. Operations on this class are performed
on the remote Bluetooth hardware address, using the BluetoothAdapter 
that was used to create this BluetoothDevice."

Does this imply that reflection is necessary to invoke methods? Why do code uses consistently use reflection for these objects?

Community
  • 1
  • 1
Nathaniel Wendt
  • 1,194
  • 4
  • 23
  • 49

0 Answers0