I have my app ready for use with all help received here and now I am receiving (not all the times) this problem when trying to compress an image when the record is sending to the remote server:
Ok, I'll do it. Any chance the error comes out because the DADO (image) is empty?
Ok, so I am open to learn about best practices... what should I do in this case? These blocks are inside FOR...EACH to get each record from SQLITE to prepare the record to send to the server.
Well, I have found the error. The problem is that a user tried to pick up more than 10 images and after this the error came out. I am going to change ImagePicker for this approach:
And I think this will solve the problem. I initially thought they were going to put just one line with images, but...
You will notice in the ActivityStarters that I have used android.intent.action.OPEN_DOCUMENT. This will ensure that a contenturi is returned, which can then be used with the SAF block to save the files to the ASD. You could also use FilePicker instead of ActivityStarter:
You can also click on the images to rotate them if required.
Also note the use of the action variable throughout.
I left a tinydb clearTag block for testing purposes.
Credits @vknow360 for his excellent SAF extension
Credits @Kumaraswamy and me for the Image Convertor extension
Credits @ me for the Base64Convertor extension