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

Compatibility for Android 13 alarm restrictions #25

Closed
ishaangarg opened this issue Jun 18, 2022 · 1 comment
Closed

Compatibility for Android 13 alarm restrictions #25

ishaangarg opened this issue Jun 18, 2022 · 1 comment

Comments

@ishaangarg
Copy link

Thanks for this much needed android library now that paho project is abandoned.

With Android 13, setExactAndAllowWhileIdle() permission is now protected permission & only alarm apps can use it.

Can the connection with broker reliably survive in background without this permission? What are your plans to target Android 13 compatibility.

TIA

@deepanshu42
Copy link
Collaborator

Hi @ishaangarg. Yes, you are right. Starting Android 12, scheduling an exact alarm requires applications to obtain SCHEDULE_EXACT_ALARM permission.

As an alternative, Courier library provides an implementation of ping sender which uses WorkManager. WorkManager allows you to reliably schedule ping requests, to maintain the connection with broker. You can more about it here.
Thank you.

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

2 participants