And I am trying to understand if I have to put a completed filepath in the filePath or it could be with another way...
My goal is to insert images into a tableviewer, but instead of showing the filepath, I need to show image, but when I have to edit, I need to have its filepath in order to update with another picture and so on. After all of this, I send to a MySQL remote server (this step is ok already).
The base64 extension accepts an absolute filepath, what this is will depend on where the image is that you want to convert, but for example if the image is in your Download folder, then the filepath would be:
/storage/emulated/0/Download/yourimage.png
You can use the file component to construct filepaths for the ASD or Assets, just remember to remove the file:// from the beginning of the path.
store your images as datauris, that is, add the data:image/png;base64, before the base64String. You can then easily view the image in a webviwer. You can always remove the datauri prefix if required.
do not try to view the base64 String in a textbox or label, this can fail and crash your app
Why would the Webviewer1.HomeUrl be used for generating a base64String of an image ? Do you not need to be providing the output of your field from sqlite record here, with no need to convert it to a file ?
You are missing a '> after your base64 string:
data: image/png;base64,<img src='[base64String of image]'>
Now I've found a way. It's running ok. What I was trying to do is instead of show the path in TableViewer, I was trying to show image, but I went to a wrong way. I came back, just change ImagePicker to AcrtivityStarter, showing the path (as it was before) and now everything is ok.
The image in TableViewer is another case.