Android蓝牙设备反射

时间:2014-05-29 19:17:13

标签: java android reflection bluetooth

我最近发现了几个使用反射来调用Android的BluetoothDevice对象实例的方法的例子。(http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html

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

可以直接在对象实例上调用方法吗?我在有关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."

这是否意味着需要反射来调用方法?为什么代码一直使用这些对象的反射?

0 个答案:

没有答案