Can we use DownloadManager to download the bytestream. I have to download a PDF bill which is a bytestream and after download, I want to create a file. I can do it with a file but not with bytestream. has anyone does that?
You cannot read the bytestream but once the file is downloaded by DownloadManager, it would be saved in Downloads directory or application's private directory. You can create a broadcast receiver which takes following intent action.
In Broadcast receiver, you can read the downloaded file from directory. You have query in downloads db with last download id. After getting downloaded file URI, you can read the file through bytestream.