How do i launch camera after clicking input file in my webviewer?

Hi I have currently create a webview app with MIT App Inventor. It's working fine and I am currently stuck on launching my camera which able to store the image into the database.

Also, I have imported an extension by com.sunny.CustomWebView.aix it's working alright but I wish to launch my camera and upload directly instead of selecting files from my gallery

You are getting a picture from camera or from gallery? You can not do both same time.

Camera or ImagePicker will be ok, why bother to use actvityStarter?


I have remove the activity starter. Camera can launch but it still doesn't capture the image.

this is all your blocks? I did not see AfterTakePicture ?

Sorry I am new to this, what should I include .AfterTakePicture?

Open Camera drawer you will find the event block .

Is this what need's to be include in the event block?

  1. why ActivityStarter involved again?
  2. use Taifun's File extension to change 'image' to Uri, since this CustomWebview.UploadFile need a Uri.

@Kevinkun Can you provide me the extension link to change the image to uri? I cant seem to find. Also if possible can you screenshot me a sample of assembling the blocks? I would appreciate that

Something like this:

I did not tested it.

this link should be known for all App Inventor 2 users:

1 Like

I've tested it, the image can read. However, after submitting, i got a "net:ERR_FILE_NOT_FOUND" . Any suggestions on this @Kevinkun @Taifun ? Thank you very much

I have created a webview which allow user to take a picture with the camera app and upload their file into the database. The application is able to get the image. However after submitting, i got a "net:ERR_FILE_NOT_FOUND" . Here's a screenshot of my blocks and output.

What is the value of the content uri you are trying to upload?
I'm not sure, if setting the FileAccess property like this is correct... @vknow360 ?

You are right, it is incorrect.
If FileAccess property is enabled only then that event is invoked.

So it must be set just next to SetWebView method.

Hey @vknow360, I am sorry I don't understand on implementing this. Could you maybe screenshot a sample for demonstration? Also, I wish to upload a content of image @Taifun

Before or after?

@Alex123 just try it


@Kevinkun tested it but the application has lead me into this error

Here's a screenshot of my updated block.

The MakeFullPath block does not make sense in your case.. you are working with a remote url, don't you?