Tiny DB saves data in Companion but not in emulator

I have two apps using the Screen object’s “On App Pause” event for saving status data I’ll need later (into Tiny DB). Today I’ve observed, that my status data gets saved when I’m using Companion, but it gets lost when installing the APK in the emulator (BlueStacks).

I’m presenting a reduced, self-contained app with my issue. I’m attaching the blocks and the AIA.

My minimum Android version is set to 7.1.

dbtest.aia (2.3 KB)

Did you always use Bluestacks as an emulator? Was it working before?
Please use DO IT and show what was saved in TinyDB in the mykey tag.
Can you try another emulator? May be MEMU Play?

It’s a obvious behaviour I think. The data you saved in Tiny DB during testing in companion, will not be available in the compiled version(apk) installed on your emulator or any other real device as companion and the apk can be considered as two different versions of the app.

1 Like

It’s working as expected in Kodular 1.4D.1. (so the “stuff” variable’s current value is saved upon the “On App Pause” application life-cycle event). This can be tested by closing the application forcibly, and then starting it again.