Android Question How to display a ProgressDialog from Starter?

eSolution

Member
Licensed User
Longtime User
Hi, I have a complex app where I parse a lot of JSON from the web in several instances, I download photos from the web and I query a database. Most of the functions that do this actions are in separate Class modules or in the Starter Service module...

I need to show a ProgressDialog over the Activity that call the functions but no luck...I tried a lot of approaches... nothing is shown once the subs are called in the other modules ... and of course I can't display the ProgressDialog from other modules ...
I need to show the user that it needs to wait and to show him when some action is done. Updating the database from the web for example can take up to 30 sec and I can't just let the user stare to the screen or go ahead and use the app without the database updated...

Can someone show me a working solution?

Thank you!
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
How about adding a sub in your activity
with
B4X:
ProgressDialogShow("please wait")
or also
B4X:
ProgressDialogShow2("please wait",false)
and from service call this sub
B4X:
CallSubDelayed(Main,"wait_sub")
before starting processing your data ?
 
Upvote 0
Top