Class DownloadException.DownloadOnMainThreadException
-
- All Implemented Interfaces:
-
java.io.Serializable
public final class DownloadException.DownloadOnMainThreadException extends DownloadException
Thrown if you try to open a remote document/image with any of the PdfDocumentLoader or ImageDocumentLoader open methods on the main thread. If you really need to do a blocking call on the main thread use either:
openDocumentAsync(...).subscribeOn(Schedulers.io()).blockingGet()
or better
openDocumentAsync(...).subscribeOn(Schedulers.io()).blockingSubscribe( { document -> ... }, { error -> ... } )
-
-
Constructor Summary
Constructors Constructor Description DownloadException.DownloadOnMainThreadException()
-