I have made an android app (using MIT app inventor) that runs a service in the background using the Itoo extension. This means that I have no access to the android code behind it. The service is supposed to run even if the app is closed which it does in mobile phones like the Xiaomi Redmi and Samsung Galaxy but in Realme 8i (Android 13) it stops after 5-6 minutes.
I realized that this is because the phone goes into "doze mode". I have disabled every battery optimization setting I could find (like I did in the other phones and worked) but the service is still killed after 5-6 minutes.
What I found out was that if the service sends a notification for example every 1 sec AND the notification sound is not silenced, then the service stays alive ! But if the notifications sound is silenced the it gets killed.
I would upload a simple .apk to demonstrate this but I can't.
Can someone tell me how to overcome this problem ?
I have been contacting with Realme support team about 1-2 months now and exchanged around 40 e-mails. They have an automated system that every time forwards your msg to another person and they actually don't keep the history of the previous ones, so the guy asks things that I have already answered before. You can imagine how frustrating that was.
Thanks in advance
Jim
In detail I have tried the following:
Setting > Apps > App management > click "settings" > show system > search "battery" > Manage notifications > Disable all the notification option
enabled the permission in : a. settings > battery > more settings > optimize battery use > find the app and choose do not optimize. b. settings > battery > more settings > optimized standby > off. c. settings > battery > more settings > app battery management > find the app choose allow background activity.
Lock the app to run in the background