Comment afficher la barre de progression dans la zone de notification?

Salut Iam faire une aplication android dans lequel iam le téléchargement de vidéos de serveur PHP.
Iam à l'aide de HTTPURLConnection de faire de l'upload. Iam frappée en montrant la barre de progression dans la zone de notification et de mise à jour.
Iam recherche presque une semaine pour le faire.Mais ne peut pas obtenir un indice.Merci de m'aider si quelqu'un sait:

Mon code:

HttpURLConnection conn = null;
DataOutputStream dos = null;
DataInputStream inStream = null;
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "*****";
int bytesRead;
byte[] buffer;
String urlString = "http://xxxxx/My_path.php";
try {
long total = 0;
int count = 0;
//------------------ CLIENT REQUEST
UUID uniqueKey = UUID.randomUUID();
fname = uniqueKey.toString();
Log.e("UNIQUE NAME", fname);
FileInputStream fileInputStream = new FileInputStream(
new File(selectedPath));
URL url = new URL(urlString);                       
conn = (HttpURLConnection) url.openConnection();
int length=selectedPath.length();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setRequestProperty("Content-Type",
"multipart/form-data;boundary=" + boundary);
dos = new DataOutputStream(conn.getOutputStream());
dos.writeBytes(twoHyphens + boundary + lineEnd);
dos.writeBytes("Content-Disposition: form-data; name=\"uploadedfile\";filename=\""
+ fname + "" + lineEnd);
dos.writeBytes(lineEnd);
buffer = new byte[8192];
bytesRead = 0;
while ((bytesRead = fileInputStream.read(buffer)) > 0) {                                 
dos.write(buffer, 0, bytesRead);                    
}           
dos.writeBytes(lineEnd);
dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);           
Log.e("Debug", "File is written");
fileInputStream.close();
dos.flush();
dos.close();
} catch (MalformedURLException ex) {
Log.e("Debug", "error: " + ex.getMessage(), ex);
} catch (IOException ioe) {
Log.e("Debug", "error: " + ioe.getMessage(), ioe);
}       
//------------------ read the SERVER RESPONSE
try {
inStream = new DataInputStream(conn.getInputStream());
String str;
while ((str = inStream.readLine()) != null) {
Log.e("Debug", "Server Response " + str);
}
inStream.close();
} catch (IOException ioex) {
Log.e("Debug", "error: " + ioex.getMessage(), ioex);
}
InformationsquelleAutor Manikandan | 2012-08-26