Downloading Gmail attachment won't show on progress bar

view story

http://stackoverflow.com – I'm using JavaMail with imap protocol to access my Gmail account and get the InputStream from a attachment BodyPart. The problem is when I start downloading the file, I want to show the download progress but the file is downloaded without showing the progress. I tried logging out the bytes read inside the loop and I got all the log when the downloading proccess finished. I'm using AsyncTask for this. Any ideas? Thanks. protected Void doInBackground() { InputStream is = bodyPart.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); FileOutputStream fos = new (HowTos)