Android EventBus library for print notification/callback

138 Views Asked by At

Is EventBus suitable for the tasks I am trying to complete? I need a callback whenever any application prints a document.

2

There are 2 best solutions below

0
Vishal Chhodwani On

Yes it is good for getting callback.

But if you only need to use it single time then do not use EventBus library for that, you can use BroadcastReceiver or our own defined interface listener.

Because for using one time the library is not a good idea. If There are many use of callbacks then No-doubt EventBus is best.

2
CommonsWare On

I need a callback whenever any application prints a document.

Android does expose this information to apps.

Is EventBus suitable for the tasks I am trying to complete?

No, insofar as an event bus does not cause Android to provide you with information that it otherwise would not.