开发者

How to add IBluetoothA2dp.aidl interface to my project?

I'm using android version 2.2 and I cant find android.bluetooth.IBluetoothA2dp in the bluetooth sub-package android.bluetooth. Do I have to upgrade to a higher version for this file to be available. Or what else should I do so I could be able to implement 开发者_如何学Pythonthis interface to use it in my project?


I'm not sure why you need IBluetoothA2dp and not the BluetoothA2dp. But the IBluetoothA2dp interface is a hidden interface (see here). At least up to Android 3.0 (not including).

As for BluetoothA2dp class it was publicly introduced in API Level 11 (Honeycomb, Android 3.0). It was first introduced in Android as earlier as API Level 3 and marked as hidden. Then it was dramatically changed in API Level 5 at still was marked as hidden. And officially released only in API Level 11.

You can use reflection to access that class on earlier platforms, but that's a tricky and not recommended way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜