P phukol Active Member Licensed User Longtime User May 4, 2016 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User May 4, 2016 #2 The service doesn't stop when you call a sub with CallSubDelayed. It continues to do whatever it did before the call. Upvote 0
The service doesn't stop when you call a sub with CallSubDelayed. It continues to do whatever it did before the call.
P phukol Active Member Licensed User Longtime User May 6, 2016 #3 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
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.
tigrot Well-Known Member Licensed User Longtime User May 6, 2016 #5 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
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
E EduardoGodinez1975 Member Licensed User Longtime User Jun 22, 2016 #6 If IsPaused(frmLecturas)=False Then CallSub(frmLecturas, "RefrescarDatos") End If Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 23, 2016 #7 Not that the IsPaused check is not required in this case. Nothing will happen if the activity is paused. Upvote 0
Not that the IsPaused check is not required in this case. Nothing will happen if the activity is paused.