It's hard to tell why this happens with your app. Try to debug it: Attach the Eclipse debugger to your process when it hangs and then pause the entire process. Then open up (expand) the threads and see where the stack-trace of each thread is currently at. This may give you a hint about why your process/activity hangs.
On Jul 21, 6:33 am, barbapapaz <barbapa...@gmail.com> wrote: > Hello > > I execute this async task in my application, I don't understand why my > progress dialog and all application freeze. > Insert in doInBackground put one hundred or so entity in database. > > In other case (but it's fisrt time with sqlite), I use AsyncTask and I > have no problem. Do you have an idea. > > private class Select extends AsyncTask<ContentValues, Void, Void> { > @Override > public void onPreExecute() { > showDialog(PROGRESSDIALOG_KEY); > } > > public Void doInBackground(ContentValues... params) { > Uri uri = Uri.withAppendedPath(ContentUris.withAppendedId > (MY_URI, Id), DIRECTORY); > mResolver.insert(uri, params[0]); > return null; > } > > @Override > public void onPostExecute(Void in) { > mProgressDialog.dismiss(); > mListView.invalidate(); > > } > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---