I am downloading some files from server in users phone The download is working properly in Kitkat Version phone i.e its getting approx 1-2mbps but above that that the download is very slow . The code is:-
//The download Code:
while ((len1 = is.read(buffer)) != -1)
{
int demo = (int)(i * 100L / lengthOfFile);
if (demo%5==0)
{
updateNotification("TITLE", (int) (i * 100L / lengthOfFile), "TITLE2",1234);
}
fos.write(buffer, 0, len1);
}
//The notification panel update:-
private void updateNotification(String text,int progress,String title,int notify)
{
notification.contentView.
setProgressBar(R.id.status_progress,100,progress,false);
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(notify, notification);
}
//Is there something related to notification update method