Hello,
I am suffering with the following problem: (I am using https://ai2.appinventor.mit.edu/
Companion 2.74
Huawei P30 lite / Android: EMUI 12 / 6GB Ram
The Problem is, that it doesn‘t take the picture and display it. Thüe sam, when using the Camera (Media). It seems, that both items do not return a right filename (or what I need to display a picture.
Please help me
Thank You
Emanuel
Taifun
February 26, 2025, 12:04pm
2
Use Do it and show us a screenshot of the Do it result
Use the companion app and Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
Hello and thanx for the immediate answer.
I did, what you said. Thr Answer is empty.
Taifun
February 26, 2025, 2:58pm
4
What is displayed in the listpicker/listview?
How do you create the list elements?
What about providing a screenshot of some more relevant blocks?
Taifun
BildAuswahl1 is a imagpicker and as far as I understand, itis handled like this:
the image element should become the choosen pic. But it doesn‘t because it is empty.
It woks Okay first: I mean, I can choose a picture but when I ‚say‘ OK (the hook top-right), the application terminates and I am back on my homescreen.
I do the same like the guy here:
In this video, we will learn how to use image picker in MIT app inventor 2. In this video, we will create one app using image picker, in this app, we...
Taifun
February 26, 2025, 6:56pm
7
Your blocks look correct
From which folder are you picking an image from? It might be a device specific problem? Probably a permision problem?
What you could try:
another device
build the app and test using the apk fike
Taifun
Thank you very much, Taifun. I tried nearly everything. Now I am testing, using the camera. Let me show you:
After taking a foto, and click on the hook, the app disappears (dies). I also tried another device (Android 14)
I would send you the app, If I would know how. It looks so simple in the examples but I get crazy with this ‚tiny‘ problem.
ABG
February 27, 2025, 10:03am
9
(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
We need to see the component types.
Here it should be: (thank you again, you are great)
Moped.aia (199.3 KB)
Please rename Moped.aia to Moped.aia.zip . I couldn‘t upload otherwise.
Thank You and greetings from Austria
ABG
February 27, 2025, 4:45pm
11
Your earlier error message mentioned code that probably belongs to the first extension in your list.
For debugging purposes, it is better to start a new small project with just the components that give you trouble.
Here is a little test bed just for the image picker:
imagePickerTest.aia (2.2 KB)
Using this test bed, I discovered (using Companion 2.74 and my Moto G)
Attempting to read the Image Picker .Image property before it is set crashes the app.
The Image Picker .Selection seems to work.
I recommend making a similar app for the Camera, building on this sample.
Thank You very much, my friend. SoundPressure was the problem. Let me buy you a beer. Now other problems come up. Fo you know, what it means?
Thank you very much
Emanuel
ABG
February 28, 2025, 11:42am
13
(Canned Reply: ABG - Download those blocks and post them here)
Please download and post each of those event block(s)/procedures here ...
P.S. These blocks can be dragged directly into your Blocks Editor workspace.
See
for how to download individual draggable block images.
The stupid app doesn‘t want to be compiled. I am crying.
Do you have an idea?
ABG
February 28, 2025, 2:14pm
15
Follow the instructions in Project Properties for the size and type of the icon.
TIMAI2
February 28, 2025, 2:14pm
16
Remove your app icon to test for compilation. If that works, change the format and/or resize your app icon (square, no larger than 1024x1024, png format)
Thank you very much. You was completely right.
Thanx again.