Image Picker 'Image access' limitations

I would like to use Image Picker to display Gallery images, but having a problem getting started. See attached. I would like to Select a Picture using AfterPicking. Please... what simple thing did I miss? Thanks Charles

@Charles_Schwedes, this is the simplest way:


Hope this helps!
Brady

Thanks Brady,
Your suggestion was great except I can't access Image1 either. See Attachment 2. There is something else going on I don't understand. I'm on Windows 11??? Charles

what exactly does that mean? can you elaborate?
what about just dragging the block set Image1.Picture to the working area?
Taifun

@Charles_Schwedes, Here is a video, I don't know exactly what you mean but hopefully this helps.

That No available assets block is a recent enhancement to AI2 to save time retyping image file names from the Media folder.

Just delete that block to empty out the socket for ImagePicker1.Image so you can drag in the proper block:

No Image component is needed for this.

(When you buy new shoes, always remove the crumpled paper from the shoes before putting on the shoes.)

3 Likes

ABG, Brady & Taifun

Thank you ABG, I can now access ImagePicker1.Image. I always knew where to find the "shoe box", the problem was opening it. All (?) other blocks opened with a simple click, the No Available Assets one needed a right-click. Thanks again for your excellent input. Charles :wink:

ABG et al

Maybe there is still paper in the box! The right-click approach seems to have worked but apparently left hidden deleted blocks saved. I deleted everything and all worked well again until I re-added ImagePicker.AfterPicking. The No Available Access block worked correctly this time. Strange! All seems to work like it should. Sorry for any trouble I may have caused. Thanks Charles

Which server are you working on?

  • aie.appinventor.mit.edu or
  • code.appinventor.mit.edU ?

Can you recreate this behavior in a video for the support team ?


  1. 2."C:\Users\schwe\Downloads\Test_forABG.aia"
  2. http://ai2.appinventor.mit.edu/#5136665785270272

ABG

First. I don't know the server I use. No. 3 is a link to my ai2 software.
Next I opened a new project, Test_forABG, added in an ImagePicker, and tried to use it. No. 1 is a screenshot of my unsuccessfully clicking the interested block 3 times. You'll see in the left bottom the 3 errors. The actual blocks don't show.
Then on No. 2 is my attempt to send you the aia of my effort.
You can see I'm not an expert here. Hope this works. Charles

Export your .aia file and upload it here.

P.S. I am unable to reproduce your error.

Could you make a movie of it using a tool like the free ScreenToGif and post it here?

ABG,
After lunch I tried clicking this image block and it work. I still had the errors I showed you before. Next I right-clicked the delete button on screen and deleted all blocks... I now have a clean screen. Next stating over I input ImagePicker.AfterPicking, then clicked ImagePicker1.Image including the No Available Access end. Didn't work, I clicked the screen and the error went from 0 to 1. A few minutes later I clicked the block and it works fine, as it should, no new error.

Looks to me there is an error. The only way I know to clear the error is to use right-click the screen and then I've lost the project. Charles

@Charles_Schwedes, Please download the aia file and send it in this chat, I can then look over it and see if it is the server not working or the code.

Brady

Charles, try this

imagePickerTest.aia (1.5 KB)

You will see a blank button on the page, click it, select an image, the image should show on the button. Click again to select a new image.

Blocks as per ABG's previous suggestion

image

Without video evidence, all I have is your text description.

I notice you never use the word "drag" to describe the act of pulling blocks out of the Blocks Pallete onto the Blocks Workspace.
Do you drag blocks out of the pallete, or do you just click on them in the pallete and expect them to land in the right place?

TimAI2,
I couldn't find a button to click, or even see, on your ImagePickerTest.aia. The aia only showed a message announcing it's presence.

ABG,
Opening the ImagePicker.Image block either works correctly or does not appear, but does shows an error number. Clicking or dragging both work as expected, or not at all. I've found two ways to display the missing blocks. Wait awhile (can't tell you how long), open the project and see they have appeared. If you delete a piece the error number is reduced. The other way I can do this is delete the project, restart it, and see the missing blocks have appeared. Hope this helps.

Thank you both for your support and patience. Charles

I brought this latest post back to this thread.

There is no need to start a new thread here.

I recommend getting a screen session recorder so we can watch a recording of your problem.

Loom.com is good and free for starters.

1 Like

That's symptomatic of a known issue with the new Media Blocks. If you have got an image in your Media List, App Inventor will try to place a block for it in a useful place. Somewhere along the line, this adversely affects the display - so you can click or drag a Media Block or a Block with a Media Block pre-attached, and it will be added to the Project file but not displayed. Logging out of App Inventor, then logging back in, the display is corrected (Note, only works safely if Project Autoload is disabled in Settings).

Does that sound familiar Charles?

1 Like

ChrisWard,
Yes it sure does! Unless recommend otherwise I'll avoid ImagePicker for awhile. Hope this feature's problem is received soon. Thanks Charles

..... unfortunately, it isn't just the Image Picker - any Block that has anything to do with files in the Media tray can exhibit the same problem. I just hit the issue with an Image Sprite.