Android - How to enable Bluetooth to be always on?

后端 未结 6 1132
太阳男子
太阳男子 2021-02-07 15:40

Two question on Bluetooth development on Android:

  1. Is there a way to enable Bluetooth to be always on (I might have a long device discovery phase in my applicati

6条回答
  •  深忆病人
    2021-02-07 16:22

    The Bluez stack on Linux is an open source implementation. It's also available on Windows but the API is much more complete on Linux.

    When you say, 'enable Bluetooth to always be on' do you mean, always trying to discover other devices?

    Most bluetooth chips have a deep sleep mode, where the chip is mostly down and just comes up a to check for activity on any established links. It will only wake up to full power when you want it to do something (discovery, make a connection) or there is activity on an existing link.

    Yeah, it uses more battery power than if the Bluetooth were totally off but it's not a total vampire.

提交回复
热议问题