I have an app that looks for a file created by a service.
Service Code:
in the application:
The service creates/writes data into the file successfully.
Simultaneously, the application is running and periodically it checks for the existence of the file. If it exists, it reads it and process it.
However, frequently the service creates the file; the application code (above) does NOT see the existence of the file and therefore fails to process it. (The file IS there if you look from the PC, you can see it. USB connection)
Is there a cache problem or some other reason the app doesn't see it? If so, what might the resolution be?
Thanks in advance,
Rusty
Service Code:
B4X:
InstallFiles = File.ReadList(File.DirRootExternal, UpdateFiles)
InstallFiles.Add(Item)
File.WriteList(File.DirRootExternal, "test.txt", InstallFiles) 'write the list back to the file
in the application:
B4X:
If File.Exists(File.DirRootExternal, "test.txt") Then
...do something
End If
The service creates/writes data into the file successfully.
Simultaneously, the application is running and periodically it checks for the existence of the file. If it exists, it reads it and process it.
However, frequently the service creates the file; the application code (above) does NOT see the existence of the file and therefore fails to process it. (The file IS there if you look from the PC, you can see it. USB connection)
Is there a cache problem or some other reason the app doesn't see it? If so, what might the resolution be?
Thanks in advance,
Rusty