The next version of my application should update the database, and it takes quite a while. I would like to show progressDialog to update the user about the progress. The problem is that I cannot understand how and where to create a dialogue.
My main setup is that I have an activity, which is essentially a splash screen. On this screen, I would like to show progress. I have a separate DbAdapter.java file, where the DatabaseHelper class extends SQLiteOpenHelper, where I redefine onUpgrade (part of the update works fine).
I tried several different places to implement the dialogue of progress, but it seems I did not find a suitable place. I tried passing the context from my splashscreen activity to onUpgrade, but when onUpgrade starts, it seems to get the context from my ContentProvider.
Does anyone have a good example of how to display a progress dialog when updating a database?
source
share