Android Question Question abaut CallSubDelay

Hi everyone
I have a service that reads a directory structure repeatedly and must report an activity when a change occurs. for example, when one or more files are added. I can pass the string of each file name individually, but I have to do it one by one by repeatedly calling CallSubDelay. If I want to join everyone in a list and want to pass that list in the CallSubDelay parameter, I can't do it anymore. The result is an error that says that the signature is not as expected. Now in the parameter instead of a string I put a list.
Is it possible to do that?
Thanks in advance
 
Hi everyone
I have a service that reads a directory structure repeatedly and must report an activity when a change occurs. for example, when one or more files are added. I can pass the string of each file name individually, but I have to do it one by one by repeatedly calling CallSubDelay. If I want to join everyone in a list and want to pass that list in the CallSubDelay parameter, I can't do it anymore. The result is an error that says that the signature is not as expected. Now in the parameter instead of a string I put a list.
Is it possible to do that?
Thanks in advance
Thanks Erel,
I will try your tip
 
Upvote 0
No reason to use a service for that. It will not help in any way.

The correct solution is to switch to B4XPages. Everything will be simpler.
No reason to use a service for that. It will not help in any way.

The correct solution is to switch to B4XPages. Everything will be simpler.
Hi,
But is thel CallSubDelay the correct solution to reach my purpose? May I use a list in parameter or use CallSubDelay repeatedly for each item of the list?
Is there a better way?
Thanks in advance
 
Upvote 0
You can pass a List or any other object you like with CallSubDelayed, however once you switch to B4XPages it will not be needed. You can call the page methods directly. This is especially true here as you don't need to use a service at all.
You can pass a List or any other object you like with CallSubDelayed, however once you switch to B4XPages it will not be needed. You can call the page methods directly. This is especially true here as you don't need to use a service at all.
 
Upvote 0
You can pass a List or any other object you like with CallSubDelayed, however once you switch to B4XPages it will not be needed. You can call the page methods directly. This is especially true here as you don't need to use a service at all.
Ok. I understand.
But isn't the CallSubDelay the right way to pass data between B4XPages?
 
Upvote 0
Can you please show me an example how to pass a list using CallSubDelay. I tried but got error reporting an unexpected signature.
But using a string in parameter it works
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top