App with strange behavior when open/close!


After build .apk and I install it in my phone I’ve the following strange behavior:

When I close the app using the “close application” block the app closes correctly! But when I click on the icon to open the app again it opens then closes instantly! Then I need to click on the app Icon again to open the app!

Also, some values in the TineBD go crazy! It seems that all records are crazy!
The app works great with the companion, but not after install it!

Also, how can i prevent the app run if is already running?

Thank you!

1 Like

Use close screen block instead


Thanks @Boban, close screen block works great!

Now, the second problem…
I have a form with several textboxes!
When the user types any value it stores the values in the TinyDB!

But, if I close the app (using the close screen block) and open the app again, it seems that the app can only read the first value of a tag!

I save the data this way:

Then, when app starts, i call the values this way:

Only the value that was types in the first textbox was saved!

I have several forms, and each form with its own textboxes!
And only the first value is saved!

I’m not sure why this happens!

Do you have any clue why this happens?

Thank you for support!


Tks @Boban, I did what you mention:

… unfortenely the TinyBD problem still occurs!
It only saves the first item in the list!

That happens when I close and then open the app again!
It only fills the first textbox in the forms!

Clear your db tag and try again


@Boban, I cleaned all TinyDB tags, and didn’t solved!

It seems that when the app starts, it cleans all itens values from a tag, except the first item of the list!

Sorry I’m unable to reproduce your issue


I get the problem!

When the app starts it automatically fill the several textboxes in the form!
But, each textbox has an ontext.changed event, and in the end of each ontext.changed event I added another block that call a function to save all textboxes to database!

So, each time the form automatically starts it fills the first textbox, and saves all form in database! Thats why all the others textboxes are empty!

Now, I added a flag that controls the full load of form!
If formloaded=1 then save

Anyway, thank you for all the support provided here on the topic!

We are always learning! :wink::+1:

Big Hug

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.