Need help with App Inventor images

example305_1 (1).aia (4.6 KB)

After selecting the image in the app Investor Screen 2, save it in db to save the name personal image in the tag hc-06 so that the name personal image will come out when Bluetooth is connected on screen 1, but there is a problem with the image saving and output..

Hello tkddn454

Sounds as though you are following a tutorial?

  1. If the image is too large, that will be an issue.
  2. Where is the image stored for selection by your App?

Looking at your Screen1 Blocks, there are little errors here and there, which, if you used the ErrorOccured Block properly you would already be aware of.

  1. You are trying to assign a list of AddressesAndNames to local variable 'device' - but it must be initialized as a List first for the data to be processed.

  2. Clock1 Timer is enabled, but the code within the Timer Block is dependant on a 'start value' from Screen2! Note the App will crash if the User opens Screen2 because the Clock Timer is still running (always best to control Clocks via the Blocks).

  3. In Screen2 Blocks you are opening another Screen1 - this allocates more memory for an extra Screen1, which I'm sure is not your intention.

Essentially, Screen2 should be Screen1 and Screen1 should be Screen2 for your code to have a chance of working. However, there isn't really a need for two Screens. All of the GUI and all of the code can be on Screen1 - that is what I recommend you do. Start your Project again, using only Screen1.

Can you reconstruct my block code based on the answer?

You mean write your code for you?

1 Like

What have you tried?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


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

Yes, can't you make the code block I want?

Please revise the file I uploaded and provide it to me

But it is a school project/homework is it not? I have already given you guidance on what to do, implement that first. If you hit a specific problem, describe it here with the code snippet.