Error 201: Camera Doesn't Return Image

i tried to move the folder but still not working

Just in case, check you have the Drive API enabled. With the legacy editor you do this by going to Resources > Advanced Google Services, then setting "Drive API" to "On". (you will need to redeploy/republish your script)

image

I do not have this enabled in my example and it works OK, but it could be that newly created scripts require it ?

i try that too and still not work,can u tell me how u make the spreadsheet table,maybe i have something wrong with my sheet.

The spreadsheet should be simple enough. All you need is a top row with all the headings for each item. The script will append a row of new data when submitted.

We seem to have exhausted all possible issues. Only thing I can suggest is that you simplify. Create a new AppInventor app that just submits and image and data (e.g. test with my aia project and use your script web app url). Does that work ?

okei i will test that

Its work now

Screenshot_2021-06-29-10-12-07-345_com.daffaoemara.upload_CameraImage_Location_Data_GD|238x500

Great !!

Now you need to compare what you have just done (code/blocks/script) with what you have in your app, and find the difference. You may need to simplify your app in order to find it. (Logins/Screen switching etc.)

ok i will try it

hello,do u know how to make script to add all data from my report screen

See here

or here

Because you are using POST (doPost) to upload your images, you can using the GET (doGet) in your existing script to fetch data back to your app.

okei i will test it

i dont know how to do that can u make the script for me? to add all my data from my report screen please

this my AIA File
CitizenReport.aia (395.6 KB)

this my sheet

do you know how to put the longtitude,latitude and image id according to the table?
this the script


this the sheet

You tell the spreadsheet to append lat,lon,add,imageID,name,viewurl (in that order)
but your spreadsheet is set up as imageID, lat, add, lon ...

might be your issue.

sorry my bad, i will try again

do u know how to combine this photo upload script with other data from the report screen?
this script

this my aia file
CitizenReport.aia (395.6 KB)

Do you mean to send more data up to the google sheet ? The method is all there in front of you. In your blocks, add another parameter and set the data, in your script add another parameter, and add the parameter to the append section.

Follow the workflow for an existing piece of data, e.g. latitude.

yes send more data,
so i add the parameter in this upload button?


and the script where is it i should add parameter?

Yes.

Add two more sockets to the join block, then:

&myNewParameter=
myValue

In the script, to start with add it to the end of things...
below var viewurl = ....... add

var myparam = e.parameters.mynewparam[4]; (try without the [4] if it doesn't work)

in the sh.appendRow add , myparam after viewurl

what socket should i add in the block?