Android Question java.lang.SecurityException: Starting FGS with type location callerApp=......

Almora

Well-Known Member
Licensed User
Longtime User

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="34"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
'AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
    
     AddPermission(android.permission.FOREGROUND_SERVICE_LOCATION)
'     SetServiceAttribute(Starter, android:foregroundServiceType, "location")





hello
I added a notification to the application. I get this error. with sdk 34..
I couldn't solve this problem. I want to use FLP.

AddPermission(android.permission.FOREGROUND_SERVICE_LOCATION)
added.



error