background_locator_fixed
background_locator_fixed copied to clipboard
Android 14
BackgroundLocator 2 2.0.6 version ishlatganman Android 14da chiqyapdi Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{4bdb296 11745:uz.example/u0a103} targetSDK=34
@MrErkinjon @Yukams may be this will help
https://stackoverflow.com/questions/77241123/starting-tgs-with-type-location-targetsdk-34-android-14-crash-on-startup
Have a look at https://developer.android.com/about/versions/14/changes/fgs-types-required.
My fork at https://github.com/stevehayles/background_locator_fixed has the changes needed in the master branch to resolve this. I have some other differences like reverting the Google Play Services version to 20 but if you look in at the IsolateHolderService.kt file it has the fixes. You will need to have a compileSdkVersion of 34
@stevehayles i test your fork and not work after updates add to that when app had permission location and package running and app became in background and go to setting and close permission manually would be see crash for app this package not listen if app close permission or not to close service until open again
Hi, I cannot comment on your implementation, the repo shows what changes are required to update the library for Android 14.
It's not a pull request, for me it resolves the issue and I was simply offering some guidance.