Instead of using a picture of a mole, let the user select a picture with the ContactPicker component

Screenshot 2023-06-02 at 12.41.24 PM
Instead of using a picture of a mole, let the user select a picture with the ContactPicker component.

I tried additional variations to MoleMash:
• Added a slider to make the mole move faster or slower.
• Added a label to keep track of and display the number of times the mole has appeared
(moved).
• Added two more ImageSprites with pictures of the cat and monkey in addition to the mole.
I got a problem here.
• Instead of using a picture of a mole, let the user select a picture with the ContactPicker component.
I could not understand the difference between Text block, image block (.png) and the green block. I am getting the error message Property setter was expecting a com.google.appinventor.components.runtime.TextBox component but got a String instead . My blocks are here.

set clock.timerenabled to false in designer view.

set it to true after select the listpicker

and what the listpicker show in your app? does it show a meaningful string to you?

I don't understand what's happening in lispicker1 before selecting. Also,what happens after selecting?

Is it like that user selects mole and the mole appears as the clicker and when the user selects monkey then the monkey appears as clicker?

why contactPicker? do you mean imagePicker?

The list picker can only have text Elements.

You can prepare a lookup table with animal names or image file names in column 1 and the corresponding sprite component block in column 2.

Use the lookup in pairs block to get component from text names.

How is X height and Y width? Shouldn't that be the opposite????

I came up with an aia.
Animal_mash.aia (1.3 MB)
It might also not work and you may have to change some of the blocks. But just try :wink:

Thank you for the response. It is showing some links corresponding to the images. But it is not user-friendly. See the screenshot. I am sending the APK in email and QR code here., but it works for 2 hours. If you want me to send it again, I will do that.


The QR code works only for 2 hours.
Screenshot 2023-06-03 at 8.04.29 AM

The .apk file.

Thanks for the response. Please try the .APK file in QR code or link. The QR code and the link works only for 2 hours.

upload the apk do not help us to help you.
Did you do some change with the code in first post? show us the new code screen shot. and describe your problem again.

I removed the code to display a label text. That's all.
"do not help us to help you." I don't understand what you meant.
I uploaded the APK file and will do it again .
Latest screen shot!
Screenshot 2023-06-03 at 1.30.07 PM


if you want.

The correct thing in listpicker1 before picking would be set clock1 timer enabled to false, not true.

this should be in listpicker1 after selecting
blocks (26)
like @Kevinkun said in the first post

Screenshot from 2023-06-03 13-39-14

Don't know why this block is even necessary here

so What's your question ? Have you got any error message? show the error screen shot.

It is showing some links corresponding to the images. But it is not user-friendly. See the screenshot. I am sending the APK in email and QR code here., but it works for 2 hours. If you want me to send it again, I will do that.
Please see the screenshot in response to your question above.

check this

If you want, just send the aia. so that you don't need to send the qr code many times
To do that:

  • Select your project

  • Click on projects, and then click on export selected project (aia.) to my computer

  • Save the project and then upload the project

But it's not necessary