PDFViewAct using PDFHttpStream slow startup - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: PDFViewAct using PDFHttpStream slow startup

PDFViewAct using PDFHttpStream slow startup 3 years 4 months ago #9160

  • zenilja
  • zenilja's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
When I start the PDFViewAct and use a PDFHttpStream to open a remote PDF, it can take a few seconds until
the library decides it has enough information.

This is very bad UX. It would be better to do all this in the background, and immediately show a blank screen (where I then would place a loading
indicator).

How can I modify the code to do this? I see in the log that there's some downloading going on, and basic setup, all inside onCreate().
OnCreate() is a very bad place to do this! It should return very quickly, to free up the android UI thread.

Please Log in or Create an account to join the conversation.

PDFViewAct using PDFHttpStream slow startup 3 years 4 months ago #9173

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,
you can move the init bloc of code from the onCreate() method and put it where you prefer.
You can also edit or extend the PDFHttpStream class as you want.
The RDPDFReader is a project that shows the library features, not an optimized project.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum