background_locator_fixed icon indicating copy to clipboard operation
background_locator_fixed copied to clipboard

Android 14

Open MrErkinjon opened this issue 11 months ago • 4 comments

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 avatar Feb 27 '24 07:02 MrErkinjon

@MrErkinjon @Yukams may be this will help

https://stackoverflow.com/questions/77241123/starting-tgs-with-type-location-targetsdk-34-android-14-crash-on-startup

SNhenil avatar Mar 11 '24 04:03 SNhenil

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 avatar May 20 '24 07:05 stevehayles

@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

fahmyabada avatar May 25 '24 11:05 fahmyabada

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.

stevehayles avatar May 25 '24 15:05 stevehayles