D Derek Jee Active Member Licensed User Longtime User Oct 20, 2014 #1 Hi there I have created a service in my test app which gets data from a remote database and inserts it into a local db. I have on my activity a button which gives me the current row count of one of the local tables. When I start my app and in turn the service, a toast message tells me that the data has downloaded.. Every 5 seconds it does another download and a toast message informs again. However if I click my button on the activity to show me the current row count the service seems to halt until the ok button is pressed. I thought that the service would just keep running in the background and not halt for anything and I guess I am going something wrong. Have I missed something fundamental in the understanding of the services? I hope not, my brain hurts Thanks in advance, Derek.
Hi there I have created a service in my test app which gets data from a remote database and inserts it into a local db. I have on my activity a button which gives me the current row count of one of the local tables. When I start my app and in turn the service, a toast message tells me that the data has downloaded.. Every 5 seconds it does another download and a toast message informs again. However if I click my button on the activity to show me the current row count the service seems to halt until the ok button is pressed. I thought that the service would just keep running in the background and not halt for anything and I guess I am going something wrong. Have I missed something fundamental in the understanding of the services? I hope not, my brain hurts Thanks in advance, Derek.
Erel B4X founder Staff member Licensed User Longtime User Oct 20, 2014 #2 Events are not fired when a modal dialog is visible. You will need to show a non-modal dialog instead (a regular panel). Note that you can use Log instead of toast messages. Upvote 0
Events are not fired when a modal dialog is visible. You will need to show a non-modal dialog instead (a regular panel). Note that you can use Log instead of toast messages.
D Derek Jee Active Member Licensed User Longtime User Oct 20, 2014 #3 Ah.. Thank you Erel. I will be doing more than showing modal dialogs when the service runs. If I change activity or build a list from data in my local db will the service also halt? and if so will it restart the service or carry on from where it halted? Thank you so much.. Derek. Upvote 0
Ah.. Thank you Erel. I will be doing more than showing modal dialogs when the service runs. If I change activity or build a list from data in my local db will the service also halt? and if so will it restart the service or carry on from where it halted? Thank you so much.. Derek.
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2014 #4 Only modal dialogs will affect the events. Upvote 0