Android Question Call a sub from activity while running a process

phukol

Active Member
Licensed User
Longtime User
Hi guys im trying to run service which calls data from a remote DB. I then parse the result to a local db (sqlite). My problem is that i am trying to make use of a loading screen (inside the activity) and i want to update the sub calling my loading screen from the service (so that it will somehow update the user of the progress). If i call callsubdelayed, it will only call the sub from the service to the activity right? what i want is for the service to call the sub and returns back to the service until it is finished. can someone point me as to how i can accomplish this.
 

phukol

Active Member
Licensed User
Longtime User
Thank you Erel, i am trying to update the text and data from inside the sub of an activity by calling it from a service that is currently running but the sub of the activity doesnt seem to update. Im running the sub inside a thread.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
see thread.runonuithread....
 
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
My english is not too much skilled, maybe I don't understand your needs, but to update UI items in a service I use a small sub in Activity, passing the data in CALLSUB. In that sub I transfer the passed data to UI.
Have a nice day !

Mauro
 
Upvote 0
Top