What is this error, and why does it happen?
05-17 18:24:57.069: ERROR/WindowManager(18850): Activity com.mypkg.myP has leaked window com.android.internal.pol
You have to make Progressdialog object in onPreExecute method of AsyncTask and you should dismiss it on onPostExecute method.
Progressdialog
onPreExecute
AsyncTask
dismiss
onPostExecute