Liuliumoto
Liuliumoto
  • 发布:2015-05-13 17:28
  • 更新:2015-07-16 18:47
  • 阅读:1893

Android中BroadcastReceiver 广播使用Native.js如何开发

分类:Native.js

想用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,插件?

2015-05-13 17:28 负责人:无 分享
已邀请:
Android_磊子

Android_磊子

目前版本已经实现。参考 http://ask.dcloud.net.cn/question/7661

该问题目前已经被锁定, 无法添加新回复