> Thank you for your answers, the problem remains the same, the android > system > starts content provider before starting any activity, If I explicitly > starts > any activity within the content provider class the android system after > completing the task for upgrading/creating starts the MAIN activity.So can > you propose some source to start a background activity for this?
Never start an activity from a ContentProvider. You already have an activity. It is whatever activity the user is trying to use. That activity needs to operate the progress indicator (e.g., ProgressDialog), not the ContentProvider. For example, you could use an AsyncQueryHandler, so while your initial query is blocked waiting for the ContentProvider to complete...whatever it is doing...the activity can be displaying a progress indicator. Of course, better answers are: -- Find ways to eliminate any significant time required for the "task for upgrading/creating", or -- Consider not using a ContentProvider, switching instead to a Service, which gives you more API flexibility -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

