V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
nihil1943
V2EX  ›  Android

请教各位是如何处理蓝牙 socket 的连接流程的?

  •  
  •   nihil1943 · Feb 28, 2016 · 13241 views
    This topic created in 3719 days ago, the information mentioned may be changed or developed.
    从蓝牙配对到 bluetoothsocket 连接,收发数据。
    如何设计一个用户操作配对的界面流程, socket 掉线检测和重连的功能。

    bluetoothsocket 只有阻塞的接口, connect 没有 timeout 会一直阻塞,感觉很不好使,
    还有 bluetoothsocket 在 4.2 以下的 isConnected 总是返回 false 这种坑.
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2528 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 10:54 · PVG 18:54 · LAX 03:54 · JFK 06:54
    ♥ Do have faith in what you're doing.