Bluetooth and WIFI Printing for Android

Gábor Lipták picture Gábor Lipták · Jan 11, 2011 · Viewed 66.4k times · Source

We would need a portable printer (handheld, it is important) that can connect to android phone via bluetooth or wifi.

What I know currently:

  • No standard printing SDK available for Android this time
  • There is a non official SDK called iPrint SDK. Have any of you tried it through wifi or bluetooth? Does it work?
  • Printershare also claims to be programmaticly available. It would be ok for me to pay the one time fee $5 for it per phone. It has a lot of supported formats. Have you tried it with any handheld device? I asked them about the list of supported bluetooth printers (since it has a menu item "search for BT printer"), but they did not answered.

What I need to know above the already asked:

  • How do you print from your android app?
  • What kind of printer do you use?
  • Is it planned in the standard android SDK to include printing? What is the roadmap? Is it available now as Beta or something?
  • If we somehow (i dont think so) build own solution for printing via bluetooth, can you recommend standards and protocols to check and learn?

Answer

Gunnar Karlsson picture Gunnar Karlsson · Dec 8, 2013

Starting with Android 4.4 you can print documents from a device to a hardware printer via wifi.

Android apps can now print any type of content over Wi-Fi or cloud-hosted services such as Google Cloud Print. In print-enabled apps, users can discover available printers, change paper sizes, choose specific pages to print, and print almost any kind of document, image, or file.

A brief example of how to start the printing process:

private void doPrint() {
    PrintManager printManager = (PrintManager) getActivity().getSystemService(Context.PRINT_SERVICE);
    printManager.print("My document", new CustomPrintDocumentAdapter(getActivity()), null);
}

where CustomPrintDocumentAdapter extends PrintDocumentAdapter.

More information is available on Android Developers.