My application minimizes itself on Android 14

Hello,
I have an App that runs perfectly on Android 13, but on Android 14 it minimizes itself after a few minutes of working. My Samsung Tab A8 updated from Android 13 to 14 and the problem started. I have checked the same app on other devices (Android 13) and it still works properly.
Inside the app I have a notificator that runs to keep the screen on. Also, the tablet is configurated to don´t go off until 30 minutes.
Any idea of what is happening?
Thanks.

You probably need to use adb logcat to see what is happening...

Try the KeepScreenOn method from the tools extension

Thanks for your answer, but it didn´t work.
I try to put it in "screen1 initialization" also in a watch that is running all the time.

Thanks for your answer, but the solution is a very hight level for me. I won't to know how do it.

didn't work to keep the screen on or didn't work to

use logcat to find out what is going on

Taifun

What does “it minimizes itself” mean? Is the app moved to the background or does the device go into idle mode (black screen)? Are you testing with Companion or with the compiled app (APK)?

Hello Anke,
Thaks for your interest.
I am working with a compiled app (APK) and the app moved to the background.

Are you sure the app didn't crash (or quit)?

The app moved to the background. After it, I can see the app minimize with other apps or tablet pages. If I choose my app, it will be maximize, but loosing the datas. It seems to the be at the start to the app.

So it is not gone into background but closed.

Try on your other test devices to put the app in the background and then see what happens, if you put the app in the foreground again.

grafik

So the question is, why does your app crash on Android 14 or on your special device.

This extension don´t work.
I had do this:
image

These blocks do not make sense.
Put the .MoveTaskToBackground block into a Button.Click event.

I had created a button on the main screen. I have done your idea, but it doesn´t fit the problem. If I push the button, then the app goes to the background but doesn´t crash, if I put the app in the foreground it still working, but after a few minutes the app finishes by itself and goes to the background.

No, it crashes or is terminated, because

This does not happen on your other (non-Android 14) devices, if you put the app in the background and then in the foreground again. Right?

That's correct. In the other Android I don't loose the data's.

So the app crashes on Android 14. Post the aia or send it to me via PM (or upload the APK to Google Drive and post the link).

This is the link to Google Drive to the Apk: