找回密码
 立即注册
查看: 3203|回复: 0

蓝牙应用程序控制代码

[复制链接]
发表于 2015-8-17 15:30:40 | 显示全部楼层 |阅读模式
如何发现可用的蓝牙设备和蓝牙配置文件细节。 ——使用别名“tizen.bluetooth”的应用程序ID。 ——支持http://tizen.org/appcontrol/operation/bluetooth/pick操作。
  1. var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/bluetooth/pick");
  2. var appControlReplyCallback = {
  3.     onsuccess: function(data) {
  4.         console.log("success reply");
  5.              for(var i=0;i<data.length;i++) {
  6.             if(data[i].key === "http://tizen.org/appcontrol/data/bluetooth/name") {
  7.                 console.log(data[i].value);
  8.             }        
  9.              }
  10.     },
  11.     onfailure: function() {
  12.         console.log("fail reply");
  13.     }
  14. };
  15. tizen.application.launchAppControl(appControl, "tizen.bluetooth",
  16.     function() {
  17.         console.log("launch appControl succeeded");
  18.     }, function(e) {
  19.         /* Error handling */
  20.     }, appControlReplyCallback);
复制代码


欢迎来到泰泽网:http://www.tizennet.com/ 泰泽论坛:http://bbs.tizennet.com/ 好没有内涵哦,快到设置中更改这个无聊的签名吧!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|泰泽应用|泰泽论坛|泰泽网|小黑屋|Archiver|手机版|泰泽邮箱|泰泽网 ( 蜀ICP备13024062号-1 )

GMT+8, 2024-4-19 12:18 , Processed in 0.117149 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表