有没有可能让蓝牙程序在安卓1.6版上运行。我让它在安卓2.1版本上工作。当我更改项目属性并将构建目标设置为android 1.6时,
我在以下语句中得到错误,因为不支持蓝牙
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;有没有关于如何让它在android 1.6版本上工作的想法?
发布于 2011-10-24 20:40:05
官方的蓝牙应用程序接口只有available from Android 2.0 (API level 5) on;这是安卓用户的97.5%。
如果你真的需要在1.6 (API4级)上运行,你也许可以使用Experimental unofficial Bluetooth API for Android。该项目的作者暗示了how to make it work for both 1.x and 2.x。
https://stackoverflow.com/questions/7875476
复制相似问题