Hello,
Long story short: I got really frustrated my app got killed, no matter what. Tried lots of solutions on this board.
Found dontkillmyapp.com and for my very old Huawei there was a "possible" solution spelled out with the following code:
(https://dontkillmyapp.com/huawei).
The key issue is using the { tag = "LocationManagerService"; } in/for/with the (partial) wakelock. This (supposedly) stops triggering the Huawei to kill the app.
Can somebody guide me in how to translate the above code in the B4A syntax, if possible ?
Regards,
PS: Major mobile brands are mentioned on the site with possible solutions to killing processes by the OS.
Long story short: I got really frustrated my app got killed, no matter what. Tried lots of solutions on this board.
Found dontkillmyapp.com and for my very old Huawei there was a "possible" solution spelled out with the following code:
(https://dontkillmyapp.com/huawei).
B4X:
String tag = "com.my_app:LOCK";
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M && Build.MANUFACTURER.equals("Huawei")) { tag = "LocationManagerService"; }
PowerManager.WakeLock wakeLock = ((PowerManager) getSystemService(Context.POWER_SERVICE)).newWakeLock(1, tag); wakeLock.acquire();
The key issue is using the { tag = "LocationManagerService"; } in/for/with the (partial) wakelock. This (supposedly) stops triggering the Huawei to kill the app.
Can somebody guide me in how to translate the above code in the B4A syntax, if possible ?
Regards,
PS: Major mobile brands are mentioned on the site with possible solutions to killing processes by the OS.