How to use the GalleryRefresh method from the TaifunTools extension?

Use the Gallery Refresh method from the tools extension
https://puravidaapps.com/tools.php

Taifun

postfile (1).aia (60.2 KB)

i call it after the change of folder or on imagepicker1 block?
and how i can call it? I didn’t understand how to use it ! i read but i am so silly sometimes

Try like this:

22

Still cannot see the photo that i have done

postfile (1).aia (60.3 KB)

maybe i have to put photo in canvas then save?

wha is strFilename in this case?
what about


you might want to use a local variable to avoid redundancy…

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Taifun thanks for your answer!

i did as you suggested cloning the join block to filename gallery refresh but i still cannot see the refreshed gallery!
While if i close the app, go on gallery and reopen app i can see photo!

i changed in this way

but when i click on ImagePicker1 i still cannot see the photo that i saved!

I post also aia file
postfile (4).aia (60.3 KB)

what is the purpose of the Canvas.SaveAs block in this case?
what about removing that block?
also to debug you might want to display the path to the taken image in a label…

Taifun


and the path is correct is the same in notifier and label and if i go on my smartfone in that folder i find the photo! then reopen app and i can see in image picker.

but if i click directly from app imagepicker1 i still cannot see the photo!

can you provide an example path to the taken image?

I just tried to adjust your example app, but after taking a picture, I get the error message “Error 201 The camera did not return an image” on Samsung Galaxy A5 (2017) running on Android 8.0
A bug introduced with the new version?

Edit: I now created a bug report here

Taifun

the path that i see from app and from my smarthphone!

can you see the taken picture in the Gallery of your device

  1. without using the GalleryRefresh method
  2. after using the GalleryRefresh method

Taifun

No I can see the photo only if I go in that folder also outside from the app…

Then if I visit that folder I see in gallery and in app

I don’t know, why the GalleryRefresh method is not working for you…
which device / Android version are you using for your tests? did you try another device?
unfortunately my device stopped taking pictures with App Inventor, so I can’t continue with further tests currently…

this should be the correct blocks to refresh the Gallery after taking a picture
Unbenannt

Taifun

tested on huawei p20 lite and p30 lite with android 9 and 10 i changed also blocks as you posted but same problem
Anyway you are right also if i go in gallery directly i cannot see the image but i have to go in /storaga/emulated/0/pictures/ to see the photos!

then i can see in gallery and obviously in app!

is there any workaround to set the listpicker to open that folder or another folder where i can move photos and see them?

probably a Huawei issue? you might want to try another device to find it out…
Taifun

The reason can be this https://www.guidingtech.com/huawei-gallery-vs-google-photos-comparison/ ???
Is this the reason maybe?? Don’t know if the gallery image are different from huawei and other phones.
I will try on some phone not huawei of friends

As workaround is possible to upload directly the photo on the webserver cutting away the imagepicker1 selection? So there is not the problem of the gallery that not upadate but i can upload the file directly!
blocks

But i think is wrong the section get global StrFilename in my case!

Try this (to display the taken picture in the Gallery):

See also my post in this thread:

2 Likes

Thank you so much!!
worked!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.