在 Android 上通过蓝牙打印的功耗最低的方式是什么?
我正在开发一个应用程序,需要通过蓝牙打印到 Bixolon 热敏打印机。我已经得到了它,所以如果您需要通过蓝牙打印的帮助,我很乐意为您提供帮助。
困境:该应用程序的最终用户将在每天 4-5 小时的时间内每 3-5 分钟打印一张发票,因此我需要尽可能低的功耗。
我有两种可能的方式:
每次用户需要使用打印机时连接到打印机。将 BT ID 保存在数据库中后,打印大约需要 1.5-2 秒。
仅连接到设备一次,并始终保持连接打开状态。
最好的方法是什么?
我很感谢你的帮助谢谢! :)
I'm developing an app that requires to print over Bluetooth to a Bixolon thermal printer.I have already got it, so if you need help to print over Bluetooth, I would be happy to help you.
The Dilemma: The final user for this app will print an invoice every 3-5 minutes for a period of 4-5 hours daily so I need the lowest power consume possible.
I'm stocked in this two possible ways:
Connect to the printer every time the user will need to used it. It will take around 1.5-2 seconds to print having the BT id saved on the database.
Connect to the device just one time and leave the connection open at all time.
What is the best way?
I appreciate your help thank you! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您不应该太担心功耗,因为蓝牙被设计为经典电缆的低功耗替代品。但您应该阅读这篇文章:蓝牙和功耗:问题与解答,我认为它与您相关案件。
你提到的第一种方法我认为它不好,因为它首先会让用户感到沮丧,一直等待重新验证。其次,它会消耗更多的能量,因为你有重新连接的开销。
第二种方法更经济。
I think you should not worry so much about the power consumption, because Bluetooth was design to be a low power replacement for classic cables. But you should read this article: Bluetooth and power consumption: issues and answers, I think it's relevant for your case.
The first approach you mention I think it is not good, because it will be first of all frustrating for the user, to wait all the time to re-authenticate. Second it will consume more energy because you have the reconnection overhead.
The second approach is more economic.