java - HttpURLConnection show progress -
i use httpurlconnection connect server.i want show update proress.
url url = new url(requesturl); httpurlconnection conn = (httpurlconnection) url.openconnection(); conn.set...// many params. dataoutputstream dos = new dataoutputstream(conn.getoutputstream()); dos.write("http string"); // eg content-disposition: form-data...... inputstream = new fileinputstream(file); // take file stream. while(){ dos.write(filestring);// take file strean memory.this place can take prograss,but in momory,not post server proress. } dos.flush(); inputstream input = conn.getinputstream(); // place post data server,but donot how progress.
please me ,thanks.
you use asynctask that.
Comments
Post a Comment