A new empty project. The normal Click button is not available.
The first time it is available but when you remove the app from the recent apps list it will get stuck on my device.
View attachment 157962 View attachment 157963
The app runs in release mode on a Android 14 device.
It will get stuck if you leave the starter module in the project.
In this code i have commented the line 19 but left the starter module in the project.
#Region Service Attributes
#StartAtBoot: False
#ExcludeFromLibrary: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
End Sub
Sub Service_Start (StartingIntent As Intent)
' Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases.
End Sub
Sub Service_TaskRemoved
'This event will be raised when the user removes the app from the recent apps list.
End Sub
'Return true to allow the OS default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub Service_Destroy
End Sub
Line 19 code doesn't stop the foreground state. The method Service.StopAutomaticForeground doesn't seem to work in Android 14.
The only way to make this app work normal is to remove the starter module!
But don't take my word for it, just try it out and see for yourself.