Looking at "DestinationPath & "/" & FileName" I suspect you're better off using the xui.SetDataFolder("AppName") and xui.DefaultFolder route (with possible sub directories) as I fear you'll now run into all sorts of Android folder restrictions. Have you also thought about using the B4XPage_CloseRequest routine to close everything properly according to the rules?
Hi, the DestinationPath point to DirInternal but the problem is not that.
The load is succesfull.
Actually the problem is not even Android and even less B4A: the problem is THE CUSTOMER !!!
The system is not not designed to be abruptly unplugged while it is working just like a light bulb...
So looking at the "effect", I'seend and also reproduced the behaviour, writing a program that continuously write/read back from the serial port and unplugging the power, after some attempt I can corrupt the LibUART.so.
At moment I've put on the field probably a temporary solution: a POWER OFF software button on the screen that allow a proper shutdown after stopping any routine/service/timer that deal with the serial port.
But this is a temporary solution.
The final solution is to design an additional electronic board as "add-on" on the top of the electronic board I've already designed and produced in hundreds of units that act like a smart UPS.
But before doing that, what I'm looking for before be forced to do that is a way to "resolve" via software this kind of problem.
IF I could put at work, each time the app start, a "fresh" copy of the LibUART.so then I could instantiate it and in my imagination use it instead the one referenced into the "Library" tool of B4A.
So this possible solution lead into a discussion I've seen on the forum and that deal with "making" a B4A library from .so file.
But honestly this is out of my knowledge and also in all of posts in the forum about this topic I'm get lost because do not seems there is a clear answer about that.
Or maybe I'm wrong because not understood it.
So, the bottom line is: it is possible to "recover" the LibUART.so file when it is broken, supposing the overall structure on top of it is done and working in B4A?
There is somebody that could help in it?
The library is the one that can be found on this Forum and is the great one from Rui Cardoso:
https://www.b4x.com/android/forum/threads/gpio-and-uart.100811/#content
Thank you all in advance.