ilan Expert Licensed User Longtime User Nov 27, 2023 #1 Hello, i got some emails from users complaining that my apps won't start on there phones. after some checks i can confirm that my app does not ALWAYS launch the same on Android 14. in the logs i can see that the Starter Service is started but app not. the problem is that it is not always happening. after install the first start always works fine but then closing the app completely (no just sending to background) and then start again i only see a white screen. if you want to reproduce the issue just run an Android 14 Emulator or physical device and install the app in release mode. Then perform a complete close and start again. repeat this process several times and you should get into a white screen. Logs will show that the starter service has started but the app not. there is some discussion about it here: https://www.b4x.com/android/forum/t...ui-6-0-samsung-android-14.157493/#post-967625 i have the feeling that google again changed something with services and that the starter service not always starts the app. any idea how to fix it?
Hello, i got some emails from users complaining that my apps won't start on there phones. after some checks i can confirm that my app does not ALWAYS launch the same on Android 14. in the logs i can see that the Starter Service is started but app not. the problem is that it is not always happening. after install the first start always works fine but then closing the app completely (no just sending to background) and then start again i only see a white screen. if you want to reproduce the issue just run an Android 14 Emulator or physical device and install the app in release mode. Then perform a complete close and start again. repeat this process several times and you should get into a white screen. Logs will show that the starter service has started but the app not. there is some discussion about it here: https://www.b4x.com/android/forum/t...ui-6-0-samsung-android-14.157493/#post-967625 i have the feeling that google again changed something with services and that the starter service not always starts the app. any idea how to fix it?
ilan Expert Licensed User Longtime User Nov 27, 2023 #2 i also noticed that when i close the app and remove it from the stack the starter service is created. when i again open the app the starter service is started and not created and in this scenario the app won't start. to start the app the service need to be created then it will start the app. see video: Upvote 0
i also noticed that when i close the app and remove it from the stack the starter service is created. when i again open the app the starter service is started and not created and in this scenario the app won't start. to start the app the service need to be created then it will start the app. see video:
DonManfred Expert Licensed User Longtime User Nov 27, 2023 #3 it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all Upvote 0
it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all
MarcoRome Expert Licensed User Longtime User Nov 27, 2023 #4 DonManfred said: it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all Click to expand... Hi dear @DonManfred. Look at this thread, the problem is also found with the basic app Apps not launching with One UI 6.0 (Samsung, Android 14) Hello there, first of all, did any of you had a TON of problems with samsung devices since their october security update? Because on all our app i've seen a dramatic rise in crash logs and all from flagship samsung devices. Most of them are nullpointer exception in sub calls, which makes me... www.b4x.com Click to expand... in particular Apps not launching with One UI 6.0 (Samsung, Android 14) Hello there, first of all, did any of you had a TON of problems with samsung devices since their october security update? Because on all our app i've seen a dramatic rise in crash logs and all from flagship samsung devices. Most of them are nullpointer exception in sub calls, which makes me... www.b4x.com Click to expand... Upvote 0
DonManfred said: it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all Click to expand... Hi dear @DonManfred. Look at this thread, the problem is also found with the basic app Apps not launching with One UI 6.0 (Samsung, Android 14) Hello there, first of all, did any of you had a TON of problems with samsung devices since their october security update? Because on all our app i've seen a dramatic rise in crash logs and all from flagship samsung devices. Most of them are nullpointer exception in sub calls, which makes me... www.b4x.com Click to expand... in particular Apps not launching with One UI 6.0 (Samsung, Android 14) Hello there, first of all, did any of you had a TON of problems with samsung devices since their october security update? Because on all our app i've seen a dramatic rise in crash logs and all from flagship samsung devices. Most of them are nullpointer exception in sub calls, which makes me... www.b4x.com Click to expand...
ilan Expert Licensed User Longtime User Nov 27, 2023 #5 DonManfred said: it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all Click to expand... actually it will do it with the default b4a app. open b4a and create a new project (default) install android 14 on the emulator and run the app in release mode. then close app -> open -> close -> open and you will see it that it will start without loading layout. and in logs the service starter is started but not created, it is created when you remove the app from the app stack as shown in the video. it is effecting any app that will run on android 14 even without using any special libraries. Upvote 0
DonManfred said: it would help very much if you provide a small example project showing the issue. Completely hiding all code, manifest ect is of no help at all Click to expand... actually it will do it with the default b4a app. open b4a and create a new project (default) install android 14 on the emulator and run the app in release mode. then close app -> open -> close -> open and you will see it that it will start without loading layout. and in logs the service starter is started but not created, it is created when you remove the app from the app stack as shown in the video. it is effecting any app that will run on android 14 even without using any special libraries.
ilan Expert Licensed User Longtime User Nov 27, 2023 #6 here is an example with the default b4a app Upvote 0
Filippo Expert Licensed User Longtime User Nov 28, 2023 #7 ilan said: here is an example with the default b4a app Click to expand... Have you tried stopping the Starter service? I have long been in the habit of stopping the service in every application so that there is no problem when restarting. I know that this is not recommended, but I get along very well with it. B4X: Sub Activity_Pause (UserClosed As Boolean) ' Log("Activity_Pause UserClosed=" & UserClosed) If UserClosed Then 'Service beenden CallSub(Starter, "Service_Stop") ExitApplication End If End Sub Upvote 0
ilan said: here is an example with the default b4a app Click to expand... Have you tried stopping the Starter service? I have long been in the habit of stopping the service in every application so that there is no problem when restarting. I know that this is not recommended, but I get along very well with it. B4X: Sub Activity_Pause (UserClosed As Boolean) ' Log("Activity_Pause UserClosed=" & UserClosed) If UserClosed Then 'Service beenden CallSub(Starter, "Service_Stop") ExitApplication End If End Sub
ilan Expert Licensed User Longtime User Nov 28, 2023 #8 Filippo said: Have you tried stopping the Starter service? I have long been in the habit of stopping the service in every application so that there is no problem when restarting. I know that this is not recommended, but I get along very well with it. B4X: Sub Activity_Pause (UserClosed As Boolean) ' Log("Activity_Pause UserClosed=" & UserClosed) If UserClosed Then 'Service beenden CallSub(Starter, "Service_Stop") ExitApplication End If End Sub Click to expand... But if you return to the app you will need to load everything again. This is not the way i would like to solve the issue. The app should be able to go to background and allow a quick return but when the app is removed from the background tasks it should work when you open it again. And on android 14 there seems to be an issue with the starter service but i am not sure Upvote 0
Filippo said: Have you tried stopping the Starter service? I have long been in the habit of stopping the service in every application so that there is no problem when restarting. I know that this is not recommended, but I get along very well with it. B4X: Sub Activity_Pause (UserClosed As Boolean) ' Log("Activity_Pause UserClosed=" & UserClosed) If UserClosed Then 'Service beenden CallSub(Starter, "Service_Stop") ExitApplication End If End Sub Click to expand... But if you return to the app you will need to load everything again. This is not the way i would like to solve the issue. The app should be able to go to background and allow a quick return but when the app is removed from the background tasks it should work when you open it again. And on android 14 there seems to be an issue with the starter service but i am not sure
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2023 #9 Removing the starter service will probably solve it. I'm investigating this issue. Note that with B4XPages (and receivers) the starter service is less important. Upvote 0
Removing the starter service will probably solve it. I'm investigating this issue. Note that with B4XPages (and receivers) the starter service is less important.
ilan Expert Licensed User Longtime User Nov 28, 2023 #10 Erel said: Removing the starter service will probably solve it. I'm investigating this issue. Note that with B4XPages (and receivers) the starter service is less important. Click to expand... thanks for your feedback erel, since it is an old project i am using the starter service to load many stuff and store them there. it is not a b4xpages app it is a b4a only app. removing the starter service will cause other issues i guess like getting variables from activity to another. with the starter service all public variables are stored there and it is safer to use them should i change the starter service with a receiver ? what do you recommend to do? thank you Last edited: Nov 28, 2023 Upvote 0
Erel said: Removing the starter service will probably solve it. I'm investigating this issue. Note that with B4XPages (and receivers) the starter service is less important. Click to expand... thanks for your feedback erel, since it is an old project i am using the starter service to load many stuff and store them there. it is not a b4xpages app it is a b4a only app. removing the starter service will cause other issues i guess like getting variables from activity to another. with the starter service all public variables are stored there and it is safer to use them should i change the starter service with a receiver ? what do you recommend to do? thank you
Filippo Expert Licensed User Longtime User Nov 28, 2023 #11 ilan said: But if you return to the app you will need to load everything again. Click to expand... This is not true, because the starter is created again and loads everything again. Upvote 0
ilan said: But if you return to the app you will need to load everything again. Click to expand... This is not true, because the starter is created again and loads everything again.
ilan Expert Licensed User Longtime User Nov 28, 2023 #12 Filippo said: This is not true, because the starter is created again and loads everything again. Click to expand... as i said it will started again and load everything again and that takes time. if you use ExitApplication the app goes also from background and you will need to make a full app start but if you use activity.finish or just go to main screen on your android device the app and all UI is still available and the return to the app is much much quicker. Upvote 0
Filippo said: This is not true, because the starter is created again and loads everything again. Click to expand... as i said it will started again and load everything again and that takes time. if you use ExitApplication the app goes also from background and you will need to make a full app start but if you use activity.finish or just go to main screen on your android device the app and all UI is still available and the return to the app is much much quicker.
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2023 #13 ilan said: should i change the starter service with a receiver ? Click to expand... A receiver will not help here. ilan said: it is not a b4xpages app it is a b4a only app. Click to expand... (It doesn't matter. All new projects should be based on B4XPages.) Add this code to the main module: Code: #If JAVA public void _onCreate() { BA.Log("_onCreate"); } #End If Post the logs when the white screen happens. Upvote 0
ilan said: should i change the starter service with a receiver ? Click to expand... A receiver will not help here. ilan said: it is not a b4xpages app it is a b4a only app. Click to expand... (It doesn't matter. All new projects should be based on B4XPages.) Add this code to the main module: Code: #If JAVA public void _onCreate() { BA.Log("_onCreate"); } #End If Post the logs when the white screen happens.
ilan Expert Licensed User Longtime User Nov 28, 2023 #14 Erel said: A receiver will not help here. (It doesn't matter. All new projects should be based on B4XPages.) Add this code to the main module: Code: #If JAVA public void _onCreate() { BA.Log("_onCreate"); } #End If Post the logs when the white screen happens. Click to expand... ok, i did it with the default b4a app and when the ide first time install the app on the emulator running android 14 i get the whole app start cycle when i close the app -> remove from background i get the Service (starter) Start but not create. it is created on the second you remove it from the background task. Upvote 0
Erel said: A receiver will not help here. (It doesn't matter. All new projects should be based on B4XPages.) Add this code to the main module: Code: #If JAVA public void _onCreate() { BA.Log("_onCreate"); } #End If Post the logs when the white screen happens. Click to expand... ok, i did it with the default b4a app and when the ide first time install the app on the emulator running android 14 i get the whole app start cycle when i close the app -> remove from background i get the Service (starter) Start but not create. it is created on the second you remove it from the background task.
yiankos1 Well-Known Member Licensed User Longtime User Nov 28, 2023 #15 Same here https://www.b4x.com/android/forum/threads/sdk-34-b4xpage-notifications.156349/#post-964432 Upvote 0
ilan Expert Licensed User Longtime User Nov 28, 2023 #16 stopping the service on activity pause seems to solve the issue. is it ok to call this code erel? B4X: Sub Activity_Pause (UserClosed As Boolean) If Not(UserClosed) Then StopService(Starter) End Sub EDIT: it fixes the behavior and it is also a very simple fix, the question is, is it safe? i made some test and the variables are still available even if i close the app using back key or home button and then return to the app Upvote 0
stopping the service on activity pause seems to solve the issue. is it ok to call this code erel? B4X: Sub Activity_Pause (UserClosed As Boolean) If Not(UserClosed) Then StopService(Starter) End Sub EDIT: it fixes the behavior and it is also a very simple fix, the question is, is it safe? i made some test and the variables are still available even if i close the app using back key or home button and then return to the app
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2023 #17 I will release an updated version of B4A with a fix. Probably tomorrow. Upvote 0
yiankos1 Well-Known Member Licensed User Longtime User Nov 28, 2023 #18 Erel said: I will release an updated version of B4A with a fix. Probably tomorrow. Click to expand... so, we have to restore starter service after update? Upvote 0
Erel said: I will release an updated version of B4A with a fix. Probably tomorrow. Click to expand... so, we have to restore starter service after update?
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2023 #19 It is better to keep the starter service. If you removed it as a workaround for this issue then you can return back after the update. Upvote 0
It is better to keep the starter service. If you removed it as a workaround for this issue then you can return back after the update.