131
Views
4
Comments
How to load the image from the mobile device and display it
Application Type
Mobile

I have a mobile application where it has 4 buttons.

  1. Take picture 
  2. Save the picture in mobile device
  3. Load the picture from mobile
  4. Delete the picture from mobile

I am able to take the picture and save it to the mobile device but I am not able to load the picture. I have tried the below in my LoadImageOnClick client action


I have used the File Viewer Plugin for the loading the image. I have attached the OML file for what I have tried.


Can someone help me with this as I am struggling from past week?

FileSave.oml
2022-08-02 11-27-20
Miguel Amado
Staff

Hello Bhargav,


Seem to me that you are using the wrong URI in the Path attribute in the OpenDocument action. 

You can try to use the GetFileUrl that you are already using in the savefile to get the right location for the viewer.

Maybe check this sample (haven't tried it but it seems to cover your case) :
https://www.outsystems.com/forge/component-overview/10011/file-sample-app


Best Regards,

Miguel Amado

UserImage.jpg
bhargav venkatesh

Hello Miguel


I have tried with the GetFileUrl but could not load the file. Tried with the same example you specified but that app isn't opening



Thanks & Regards

Bhargav Venkatesh

2022-08-02 11-27-20
Miguel Amado
Staff

I installed your oml and generated a mobile app for android and it worked ok. I took a picture, saved it and click on load and it gave me the message that the image was loaded ok. 

You might have a permissions problem on your device

UserImage.jpg
bhargav venkatesh

Even I can see the message image loaded but I cannot see the image. I have checked the permissions on my device everything is fine Miguel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.