I have developed an Android application which prints a photo using either PrintHelper or Hp mobile print SDK. However, when before the printing process, Android print Dialog comes up on the screen.
How can I skip the android print dialog, when the application prints the photo ?
I have already come across below questions. Briefly, the answers are "there is no way to do this."
- Print without print dialog Android
- Print from android without system dialog
- Is it possible to directly print content to a wifi-connnected printer without user interaction in android programming?
- https://code.google.com/p/android/issues/detail?id=160908
However, I have tried to use HP ePrint android application to print any photo. In this application, there is no any Android Print Dialog, It can print any document directly, without displaying Android Print Dialog on the screen.
So that means, there is a way to print a doc directly.
It is possible for printint to PDF by calling print adapter lifecycle methods. However as callbacks are non public abstract classes and system throws segfault if null is supplied, you need to use DexMaker to implement them. I have implemented for webView adapter like this: