0

Please share full example. I was getting an example of Google cloud printing with hp printers, but I want My mobile should connect with all printers. Even I looked up with Brothers Print SDK for Android, this will work only for brothers printers. As I want Android phone should connect to each and every printer to print document.

Anchal Radhwani
  • 156
  • 1
  • 15
  • I want a source code that detect list of wireless printer in my android application, so that I transfer a file from phone to printer. – Anchal Radhwani Dec 23 '15 at 09:15
  • 1
    Its not possible to search for Wifi printer without Plug-in install. U can simply try it urself try printing a doc/pic from device with no plug-in installed on device. – kevz Dec 23 '15 at 09:31
  • guys please share some code. – Anchal Radhwani Dec 23 '15 at 12:15
  • How print share is using multiple plugins in one android application? – Anchal Radhwani Dec 28 '15 at 10:37
  • I really don't know much about how did they do. A wild guess is that they smhow managed to discover multiple printers from different manufactures and that make possible to print doc. – kevz Dec 28 '15 at 10:50
  • checkout this answer might help u http://stackoverflow.com/a/30828357/1878151 – kevz Dec 29 '15 at 06:54
  • thanks kevz!! Already check with this. Inside this it is working with printer plugins. In my higher android versions I have google cloud and hp. – Anchal Radhwani Dec 29 '15 at 07:04

1 Answers1

0

In Android 4.4 (API level 19) and higher, the framework provides services for printing images and documents directly from Android applications.

/**
 * To print image / photo
 */
private void printPhoto() {
    // Get a PrintHelper instance
    PrintHelper photoPrinter = new PrintHelper(this);
    photoPrinter.setScaleMode(PrintHelper.SCALE_MODE_FIT);
    // get image from mipmap folder
    Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
    // provide job name (which will be displayed in the print queue) and bitmap
    photoPrinter.printBitmap("droids.jpg - test print", bitmap);
}

Read Print through android device