Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print without print dialog Android

Simple Android App just developed. I have the printing functionality working in android version 4.4 via api google.

Anyway my final purpose is to print automatically to default printer without any ui interface. Print content is simple html. I need some custom code to resolve this issue.

Kind regards Danilo

like image 427
Danilo Pellicano Avatar asked Apr 22 '15 15:04

Danilo Pellicano


1 Answers

I think, We can't able to hide that Print Dialog, coz, PrintManager class is final. So, We are not allowed to override that.

When you call this print(String, PrintDocumentAdapter, PrintAttributes) from an activity, It starts Print jobs also it will bringing up the system print UI.

If you want an example for Printing a Document you can refer to this Android-wifi-print - GitHub. This is just a prototype for printing a document using wifi printer.

like image 144
SureshCS50 Avatar answered Sep 27 '22 23:09

SureshCS50