I need to log, errors and application progress.
As this IS AN Android app I've decided that only if there's a web service fail will i write anything to this local log file..
So I don't need notifications just an async write to file. I've looked over the AsyncStreams tutorial.
All I really want to do it asynchronously write to a file. I may add the web service call to this little asynchronous method since the actual write to file will only happen if the web service is inaccessible. I believe I understand how to accomplish that , but the little writing to file part .. all these references to buffers and ports seems to be overkill for this little task
How to I simply write out a log file asynchronously ??
As this IS AN Android app I've decided that only if there's a web service fail will i write anything to this local log file..
So I don't need notifications just an async write to file. I've looked over the AsyncStreams tutorial.
All I really want to do it asynchronously write to a file. I may add the web service call to this little asynchronous method since the actual write to file will only happen if the web service is inaccessible. I believe I understand how to accomplish that , but the little writing to file part .. all these references to buffers and ports seems to be overkill for this little task
B4X:
Originally Posted by Erel View Post
I recommend you to write the buffer to a file:
Code:
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "1.dat", False)
out.WriteBytes(buffer, 0, buffer.length)
out.Close
How to I simply write out a log file asynchronously ??