想用NJS开发蓝牙通信,在蓝牙通信中使用了BroadcastReceiver 广播,但是不知道NJS是如何建立起这个广播的,比如以下代码
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (BluetoothDevice.ACTION_FOUND.equals(action)) {
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
System.out.println(device.getName());
}
}
}
使用NJS该如何翻译?或者可以使用其他的方式开发蓝牙,h5+SDK,插件?
Jayming1024
晕,搞了2天,绝望了
2015-07-16 17:25
Android_磊子
目前已经支持了。
2015-07-16 17:42