DynamixSoftware / PrintingSample

34 stars 23 forks source link

What does onFileOpen(Int, Int) function do? #15

Closed sudhirkhanger closed 3 years ago

sudhirkhanger commented 4 years ago

What does onFileOpen(int progress, int finished) function do? What do values 0 for progress and 1 for finished mean?

Consider the case where the last print failed, for example due to lack of printing papers. Now, the printer may not do subsequent printing until manual intervention.

In the above case, PrintHand calls onFileOpen(int progress, int finished) function with values 0 for progress and 1 for finished. Neither onError(result: Result?) nor RemoteException is called. None of the printing callbacks are called. What does the onFileOpen() method do? Why is onError() or RemoteException thrown.

Edit: It seems like onFileOpen() is called anyway. And it seems PrinterCallBack's sendingPage() is called with a progress of 100 but finish() is never called in cases like where printer may have erred out.