I have a service that will return some PDF bytes (that may be several MB); however the bytes string are embedded in an xml structure:
<response>
<code>1</code>
<message>ok</message>
<bytes>......(here comes the pdf bytes).....</bytes>
</response>
I would like to do a simple http request to read the code tag before I start the download manager to download the bytes. Because the code may indicate an error so I would manage to simply show the message alert to user.
However I believe that using the Download Manager will ease the process of managing the download without interrupting app.
Is it possible to pass the inputstream so that the manager continues the download and appear in Android notification center?
App may not be able to recall the request once the status is known, because the status may change in the following request.