Customize native dialog box when upload widget is clicked on Mobile application
Question
Application Type
Mobile

Hello All,

My requirement was to allow a user to open the camera and should be allowed to take a video on a click of a button.

I used the Outsystems out-of-box Upload widget and it works perfectly as I am given the following 3 options. 

  1. To select from library 
  2. Take video from camera
  3. Browse

But I want to hide the first and last options and if possible straight away take the user to the camera.

Is there some way I can customize this behaviour?

Any help will be much appreciated.

VideoUpload.png

Hi Anurag,


If you are using upload widget provided by Outsystems UI. then there are options to select accept in property area.

  • In case if you select any : there you can select any file type videos, from gallery also able to access camera.
  • In case Video: you will have camera videos and video available in Gallery.
  • In case Image: you will have image from gallery and camera.

But in you case.

I think you should use camera plugin  and add client action on button click rather than upload widget.

https://www.outsystems.com/forge/component-overview/1390/camera-plugin

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Mobile_Plugins/Camera_Plugin?_gl=1*wx6ptm*_ga*MTkwMTQ4OTM0LjE2MTA4NzMzOTk.*_ga_ZD4DTMHWR2*MTYyMzM5NTUyMi4xNTkuMS4xNjIzMzk2ODk3LjU5


What you need to do

  1. You can create a button similar to upload widget.
  2. Then use camera client action(Take a picture) provided by camera plugin to directly invoke camera only.

You can go though above URL and documentation to get more idea.

last you need to create apk and test in actual device as its plugin , so you must build new apk.


Hope it will help you.


Cheers,

Dileep



Hi Dileep, 

Thanks for helping out. As mentioned by you , I am currently using the accept property and I have set it as Video because my case involves upload of video. 

So changing the accept property isn't what I need.

Regarding the camera plugin, it doesn't work with videos and it is only useful if I need to click pictures.

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