安卓:蓝牙打印蓝牙

2023-09-03 22:22:26 作者:人穷志不短。*

我要开发的应用程序的Andr​​oid平板电脑,要求打印文件到 蓝牙打印机。印刷蓝牙是我的应用程序的最重要的特征之一。遗憾的是,没有很多的关于这个主题的信息,所以我想请教。

I have to develop an App for Android tablets that demands printing files to a Bluetooth printer. Printing over Bluetooth is one of the most important features of my app. Unfortunately, there's not a lot of information about this subject so I'd like to ask for advice.

据我知道这是不是可以打印,通过蓝牙在Android(使用本地通话),作为Android的BT协议栈并没有实现BPP(基本打印模式)。做了一些研究,我发现了以下方案:

As far as I know it's not possible to print over Bluetooth on Android (using native calls), as Android's BT Stack doesn't implement BPP (Basic Printing Profile). Doing a little research I've found the following alternatives:

的SDK /库

Sybase-iAnywhere-Blue-SDK-for-Android :商业SDK支持 大量的BT文件。一个大公司开发的(良好支持我 猜测)。我还没有发现有很多关于这一个信息。是 还有一些文档,API或如何使用该SDK的例子吗?是否 有人知道如何下载试玩版? (联系似乎是 打破我最后一次尝试) iPrint的SDK:商业SDK。在他们的网站上,但没有其他的一些例子。 的ZebraLink:仅适用于Zebra打印机(自然)。其他制造商可能有API,用于他们的打印机了。 Sybase-iAnywhere-Blue-SDK-for-Android : Commercial SDK that supports a lot of BT profiles. Developed by a large company (good support I guess). I have not found a lot of information about this one. Is there some documentation,API or examples on how to use this SDK? Does anybody know how to download the demo version? (link seems to be broken last time I tried) iPrint SDK: Commercial SDK. Some examples on their website but nothing else. Zebralink: Only for Zebra printers (naturally). Other manufacturers probably have APIs for their printers too.

谷歌Play应用

的PrinterShare:商业(premium键) 蓝牙智能打印:免费轻便。声明打印到蓝牙打印机。

理想我不希望被捆绑到一个特定的品牌或打印机型号。现在的问题:

Ideally I wouldn't want to be tied to a specific brand or printer model. Now the questions:

你认为这将是最好的选择? 请您知道任何其他的替代方案,我已经错过了? 我可以很容易地从我的应用程序使用外部应用程序?打印文件 我应该使用什么格式,我的文件,以便能够打印出来了 蓝牙? (PDF格式,图像等。) 在打印机制造商和型号有何意见? 你有过任何真正的经验,在Android?打印蓝牙 有没有在不久的将来的任何计划实施蓝牙 印刷在Android? What do you think it would be the best choice? Do you know any other alternative that I've missed? Can I easily print files from my App using an external App? What format should I use for my files to be able to print them over Bluetooth? (pdf,images,etc.) Any advices on printer manufacturer and models? Have you had any real experience printing over Bluetooth on Android? Is there any plans in the immediate future to implement Bluetooth printing on Android?

在此先感谢您的帮助;)

Thanks in advance for your help ;)

推荐答案

斯大精密具有通过蓝牙安卓打印的SDK(以及以太网和USB)。你可以在这里下载:http://www.starmicronics.com/support/SDKDocumentation.aspx.

Star Micronics has an SDK for Android printing via Bluetooth (as well as ethernet and USB). You can download it here: http://www.starmicronics.com/support/SDKDocumentation.aspx.

正如你提到的,你本身不能在这一点上打印的时间,让你找到了替代解决方案今天你的选择。

As you mentioned, you can't print natively at this point in time so the alternate solutions you found are your options today.

在我的经验,最好使用一个API,而不是外部应用程序。最大的原因就是,你得到完全控制打印机的行为。这是一件容易的事,如果API构建智能化。使用外部应用程序的限制,因为你不能自定义您的打印输出你想要的方式。

In my experience, it's best to use an API and not an external application. The biggest reason is you get total control over printer behavior. It's easy too if the API is built intelligently. Using an external app is limiting because you can't customize your print outs the way you want to.

星SDK我联系你有一个非常好的示例应用程序,让您测试和定制了大量的打印机功能,看看他们在行动。每个函数都被记录在源$ C ​​$ C。该命令及其参数也都在应用程序本身作为一个快速的在屏幕上参考这是方便使用。在最严重的是,它是有据可查的。

The Star SDK I linked you to has a really nice sample app that lets you test and customize a lot of printer functions to see them in action. Each function is documented in the source code. The commands and their parameters are also available in the app itself as a quick on screen reference which is convenient. On top of all that, it's well documented.

星的一个伟大的公司与因为你可以得到你所选择的免费试用打印机使用的开发工作。

Star's a great company to work with because you can get a free demo printer of your choice to use for your development.

如果您选择这种方式,您可以发送纯文本以及命令的打印机。该API处理将数据转换成什么打印机可以理解的。

If you choose this way, you can send plain text to the printer along with commands. The API handles converting the data into what the printer can understand.