Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App not responding modal occurs in android 14. #244

Open
myzow opened this issue Oct 8, 2024 · 5 comments
Open

App not responding modal occurs in android 14. #244

myzow opened this issue Oct 8, 2024 · 5 comments

Comments

@myzow
Copy link

myzow commented Oct 8, 2024

I am using react-native-geolocation-service to fetch location with Background actions . It is working fine in all other android versions but getting the "App not responding modal" in andorid 14 after some time.
Untitled design
Uploading Untitled design.png…

@carozo
Copy link

carozo commented Oct 21, 2024

same issue, did you find a solution?

@DevAsrar
Copy link

DevAsrar commented Dec 5, 2024

Any update, Facing same!

@tmaly1980
Copy link

tmaly1980 commented Dec 5, 2024

We seem to be facing the same issue, any suggestions?

@myzow What did you conclude?

@tmaly1980
Copy link

The problem I discovered is the service type set to "shortService" as recommended in this library's docs. The Android specs are here: https://developer.android.com/develop/background-work/services/fgs/service-types

The app will say "App is Not Responding" if the code runs for longer than 3 minutes. In my case, I have an infinite loop scanning an offline database to sync with the server periodically.

I switched the service type to "dataSync" and made modifications as recommended here: https://developer.android.com/develop/background-work/services/fgs/service-types#data-sync

Now it seems to work without limitations. Only issue I've read is Google will require a video showing the functionality.

@OB42
Copy link

OB42 commented Dec 25, 2024

I switched the service type to "dataSync" and made modifications as recommended here: https://developer.android.com/develop/background-work/services/fgs/service-types#data-sync

Can confirm it also worked for me by adding dataSync and <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/> 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants