The Developer Concole gives this as an issue that needs attention :-
Missing foreground service type
From Android 14, developers must specify service types when foreground services are found in their app's manifest. A version of your app that is currently in production is crashing because it tries to start a foreground service when no foreground service type is declared. Make sure that service types for the services that start in the foreground are specified in your app's manifest.
The stack for the crash shows this
Exception java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5286)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2531)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:230)
at android.os.Looper.loop (Looper.java:319)
at android.app.ActivityThread.main (ActivityThread.java:8919)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
Caused by java.lang.RuntimeException:
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleStartIntent (ServiceHelper.java:173)
at uk.co.stefsquared.vanguard.starter.handleStart (starter.java:102)
at uk.co.stefsquared.vanguard.starter.access$000 (starter.java:8)
at uk.co.stefsquared.vanguard.starter$1.run (starter.java:74)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:240)
at uk.co.stefsquared.vanguard.starter.onStartCommand (starter.java:72)
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5268)
Caused by android.app.MissingForegroundServiceTypeException:
at android.app.MissingForegroundServiceTypeException$1.createFromParcel (MissingForegroundServiceTypeException.java:53)
at android.app.MissingForegroundServiceTypeException$1.createFromParcel (MissingForegroundServiceTypeException.java:49)
at android.os.Parcel.readParcelableInternal (Parcel.java:4882)
at android.os.Parcel.readParcelable (Parcel.java:4864)
at android.os.Parcel.createExceptionOrNull (Parcel.java:3064)
at android.os.Parcel.createException (Parcel.java:3053)
at android.os.Parcel.readException (Parcel.java:3036)
at android.os.Parcel.readException (Parcel.java:2978)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground (IActivityManager.java:7234)
at android.app.Service.startForeground (Service.java:775)
at anywheresoftware.b4a.objects.ServiceHelper.StartForeground (ServiceHelper.java:85)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleStartIntent (ServiceHelper.java:171)
This is a B4A project built with Version 13 targeting SDK 34
I have Service.StopAutomaticForeground in the Service_Start Sub of Starter
As is so often the case, I am unable to duplicate the error
Any help much appreciated
Missing foreground service type
From Android 14, developers must specify service types when foreground services are found in their app's manifest. A version of your app that is currently in production is crashing because it tries to start a foreground service when no foreground service type is declared. Make sure that service types for the services that start in the foreground are specified in your app's manifest.
The stack for the crash shows this
Exception java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5286)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2531)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:230)
at android.os.Looper.loop (Looper.java:319)
at android.app.ActivityThread.main (ActivityThread.java:8919)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
Caused by java.lang.RuntimeException:
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleStartIntent (ServiceHelper.java:173)
at uk.co.stefsquared.vanguard.starter.handleStart (starter.java:102)
at uk.co.stefsquared.vanguard.starter.access$000 (starter.java:8)
at uk.co.stefsquared.vanguard.starter$1.run (starter.java:74)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:240)
at uk.co.stefsquared.vanguard.starter.onStartCommand (starter.java:72)
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5268)
Caused by android.app.MissingForegroundServiceTypeException:
at android.app.MissingForegroundServiceTypeException$1.createFromParcel (MissingForegroundServiceTypeException.java:53)
at android.app.MissingForegroundServiceTypeException$1.createFromParcel (MissingForegroundServiceTypeException.java:49)
at android.os.Parcel.readParcelableInternal (Parcel.java:4882)
at android.os.Parcel.readParcelable (Parcel.java:4864)
at android.os.Parcel.createExceptionOrNull (Parcel.java:3064)
at android.os.Parcel.createException (Parcel.java:3053)
at android.os.Parcel.readException (Parcel.java:3036)
at android.os.Parcel.readException (Parcel.java:2978)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground (IActivityManager.java:7234)
at android.app.Service.startForeground (Service.java:775)
at anywheresoftware.b4a.objects.ServiceHelper.StartForeground (ServiceHelper.java:85)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.handleStartIntent (ServiceHelper.java:171)
This is a B4A project built with Version 13 targeting SDK 34
I have Service.StopAutomaticForeground in the Service_Start Sub of Starter
As is so often the case, I am unable to duplicate the error
Any help much appreciated
Last edited: