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

The play store console stated that am using FOREGROUND_SERVICE_DATA_SYNC even though I don't. #600

Closed
AmirDotDev0 opened this issue Apr 4, 2024 · 8 comments

Comments

@AmirDotDev0
Copy link

The console is forcing me to declare tasks and provide videos for those tasks that use foreground services.
My app does not use any foreground services and never has, am currently using (implementation 'com.github.hannesa2:paho.mqtt.android:4.2') and am wondering if the new version "4.2.4" removed the foreground service.

I just want to clarify that I didn't run the MQTT client in foreground.

@hannesa2
Copy link
Owner

hannesa2 commented Apr 5, 2024

Here is the pull request to remote this #583 It's a leftover and needed in version 3.x

@kashyap-5paisa
Copy link

kashyap-5paisa commented Apr 5, 2024

Not able to release app playstore blocking the release requesting for a video with foreground service, please help with solution! BTW why do we need FOREGROUND_SERVICE_DATA_SYNC??

ERROR on Playstore -

Your app uses the FOREGROUND_SERVICE_DATA_SYNC permission. You can only use this permission if your app performs tasks noticeable to the user when they're not directly interacting with your app.

@AmirDotDev0
Copy link
Author

AmirDotDev0 commented Apr 5, 2024

Excellent! By updating the dependency to version "4.3.beta1" (implementation 'com.github.hannesa2:paho.mqtt.android:4.3.beta1'), the persistent FOREGROUND_SERVICE_DATA_SYNC permission error has been successfully resolved in my app release process.

The FOREGROUND_SERVICE_DATA_SYNC permission is crucial for apps that undertake user-visible tasks even when they're not actively engaging with the app.

With this issue resolved, I can now proceed with the app release seamlessly. Thank you for your assistance!

@hannesa2
Copy link
Owner

hannesa2 commented Apr 5, 2024

Glad to help you. I hope it works ! Please keep me informed

@AmirDotDev0
Copy link
Author

AmirDotDev0 commented Apr 5, 2024

Glad to help you. I hope it works ! Please keep me informed

It worked perfectly, I republished the app, and the FOREGROUND_SERVICE_DATA_SYNC permission error is gone

@kashyap-5paisa
Copy link

Thank you very much. Really appreciated. 👍

@hannesa2
Copy link
Owner

hannesa2 commented Apr 7, 2024

It worked perfectly, I republished the app, and the FOREGROUND_SERVICE_DATA_SYNC permission error is gone

Sure, publish works now.
I mean, does the MQTT functionality works properly ?

@AmirDotDev0
Copy link
Author

AmirDotDev0 commented Apr 7, 2024

Sure, publish works now. I mean, does the MQTT functionality works properly ?

I wouldn't have published the app if it didn't work, or if there is a bug or an error, I've tested the app carefully before I publish it and everything seems to work fine without issues or crashes.

I've recently added a chat feature to my app and I'm using MQTT for that, and after I updated the client dependency to "4.3.beta1" I've tested the following on Android 9, 10, 11, 12, 13 and 14:

  1. Connect to the MQTT broker: SUCCESS
  2. Subscribe to topics: SUCCESS
  3. Publish messages: SUCCESS
  4. Receive messages: SUCCESS

So far everything is working without problems but my testing is not done yet, I need to do more testing regarding reconnecting and disconnecting.

Also, I would like to thank you for such amazing work on this library, I've tried a lot of MQTT client libraries but none of them worked without problems, this is the only library that worked without problems on all Android versions from 9 to 14.

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

3 participants