When i go from screen 1 to screen 2 my app crashes

Is it possible that your Redmi has suffered some physical damage internally? Or is it jam-packed with Apps? Third Party Antivirus?

One thing Android does not like is oversize images (dimensions and bytes). I mentioned before that your images need to be optimised. Your menu button is 50pix x 50pix but the image for it is 512pix x 512pix and compressed. So the processor has to decompress the image to memory and then scale it down. Several images actually means a lot of memory wasted and sometimes the decompression process simply fails, crashing the App before it is installed or shortly after. So, not your current problem but could become your next problem :upside_down_face:
How to fix the images:
https://www.professorcad.co.uk/appinventortips#TipsImages

1 Like

ok thanks @ChrisWard for guiding me
i will surely see this once

1 question to ask:- is it compulsory to have all images as PNG?

i don't think so that any of them is possible
but i myself have to see that

It is a good idea to use PNG because it scales well and as you know, phones are different shapes, sizes and screen resolutions.

By the way, there is a 50 x 50pix png for the menu button in my SOS project example (drawn by me so anyone can use it freely).

ok thanks @ChrisWard for the info.

Btw do you have any idea why the SOS button is not working in my device.. i mean the saving & sending issues?
thanks

Is it my code or your version of my code?

Sending issue - the send (currently set at 2-3 seconds per message) could be too fast for your region. You can experiment with that value.

Saving Issue - Check the TinyDb Namespaces.

its yours only... i tried it out with redmi note 7 pro & samsung galaxy M30SE it didn't worked
so i asked

ok thanks.. will try it out :slightly_smiling_face:

Hitting the Save button did not save? (Note, anything saved is lost if using the Companion)

you said right! i that's why i tested with aia, clicked on save but it didn't save
don't know why
sorry

...or APK even :owl:

The only thing I can think of is that something in the project files (the files that make an aia and are normally unseen by all) has somehow been corrupted - perhaps the process of uploading - downloading. However, very slim chance of that given that the App can be installed.

Actually, I noticed about a week ago (someone else's project) that some how values not ever saved to TinyDb were extracted from TinyDb. I fixed that by adding the clear all block before saves were made. You could add that to my code.

ok i will try to do it with that
thanks

Hi again Neelam

I think I have solved the "no send" mystery. I got one of my daughters to install, and she reported the same problem. So then I watched her use the App - she tried to Send before Save, but the code relied on a save to make a list of numbers to send to - so, very bad code by me :flushed:

I have changed that - the contacts are saved automatically but the save button remains because most people like to be "double sure" things are saved.

Also concerning Send, you do have to change location by at least 5 metres for current location to be registered, however Yuan (daughter) had much better results than I did, Her phone is an Huawei Pro 30.

So, attached is a modified project file.
SOS_BUTTON2.aia (17.9 KB)

hi ChrisWard
i guess your daughter is a genius!!
thank you very much solving my 1 more problem again but this time a big thanks to your daughter Yuan
thanks