I'm trying to develop an application to understand android, application delete's default browser's history. Every thing is working fine, I'm using AsyncTask
to accomplish the task with ProgressDialog
Here is how I'm deleting the History
ProgressDialog pd;
new AsyncTask<Void, Void, Void>()
{
@Override
protected void onPreExecute()
{
pd = ProgressDialog.show(HistoryClean.this, "Loading..",
"Please Wait", true, false);
}//End of onPreExecute method
@Override
protected Void doInBackground(Void... params)
{
Browser.clearHistory(getContentResolver());
return null;
}//End of doInBackground method
@Override
protected void onPostExecute(Void result)
{
pd.dismiss();
}//End of onPostExecute method
}.execute((Void[]) null);//End of AsyncTask anonymous class
But instead of ProgressDialog
I want to implement CircularProgress
which it can display the progress value like 10% , 90%....
Some times History
may gets deleted faster and some times it may be slow, how to address this problem and dynamically update the CircularProgress
bar with Progression Values
.
Thanks in advance.