problem with pictures

37 views
Skip to first unread message

Peppe Czeta

unread,
Apr 29, 2019, 1:03:15 PM4/29/19
to MIT App Inventor Forum
when i try to take a picture, the app save it twice, the first time calling it app_inventor.(some number) and the secondo giving it the name i choose 

TimAI2

unread,
Apr 29, 2019, 2:21:22 PM4/29/19
to MIT App Inventor Forum
Please show your relevant blocks, so we can see what you are trying to do

Right Click in Blocks Editor and select "Download Blocks as Image"
(use image editor to crop etc. if required)

In the forum, click on the image button to upload your blocks image



Peppe Czeta

unread,
Apr 29, 2019, 2:44:43 PM4/29/19
to MIT App Inventor Forum
doesn't work the right click, hope this file is ok 
AI2.png

TimAI2

unread,
Apr 29, 2019, 3:00:17 PM4/29/19
to MIT App Inventor Forum
1. After a picture is taken with the camera Android/Ai2 saves that image to file
2. Canvas saveAs saves the background image of the canvas to file

Two different images (they might look the same, but come from different places)

Peppe Czeta

unread,
Apr 29, 2019, 3:43:00 PM4/29/19
to MIT App Inventor Forum
yeah, i noticed it but, there is some way to skip the point 1? 'cose it show the normal photo in the gallery and not the modified with canvas 

TimAI2

unread,
Apr 29, 2019, 6:10:52 PM4/29/19
to MIT App Inventor Forum
Using Taifun's file extension it is possible to delete files...

The alternative is to name the canvas saveas file the same as the one saved by the camera (which should overwrite the original), then rename it ? - not tested...

Also See Here:

Peppe Czeta

unread,
Apr 29, 2019, 6:20:58 PM4/29/19
to MIT App Inventor Forum
ok, thanks!! i'll try! 

Peppe Czeta

unread,
May 2, 2019, 2:19:28 AM5/2/19
to MIT App Inventor Forum
i have another problem, i wanna save the photos with the name photo_1, photo_2 ecc.. but every time i close the app it restart from number one overriding old photo, how can i modify this? 

Chris Ward

unread,
May 2, 2019, 5:24:53 AM5/2/19
to MIT App Inventor Forum
Hi Peppe

You can store the current photo number in TinyDB and restore that number when the App Opens.

SavePhotoNumberToTinyDb.png


Peppe Czeta

unread,
May 2, 2019, 6:30:45 AM5/2/19
to MIT App Inventor Forum
Thank you Chris 😊 I tried to solve it putting the time, but what i was really tying to do was the db method, thank a lot
Reply all
Reply to author
Forward
0 new messages