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

ANDROID: No longer receiving EVENT_IDLE for API26+ #339

Open
mgorges opened this issue Sep 28, 2020 · 6 comments
Open

ANDROID: No longer receiving EVENT_IDLE for API26+ #339

mgorges opened this issue Sep 28, 2020 · 6 comments
Labels

Comments

@mgorges
Copy link
Contributor

mgorges commented Sep 28, 2020

While speaking of Android - with the recent move to API 26 the app does no longer receive EVENT_IDLE when the device is in doze mode. I.e., 10'' after switching the display off, there is no signal anymore. Background work stops.

Any knowledge or hint how to fix this?

Originally posted by @0-8-15 in #330 (comment)

@mgorges
Copy link
Contributor Author

mgorges commented Sep 30, 2020

Where did we move to API 26, the current minimum target is 21, and the Google Play store-required target is 28?

@0-8-15
Copy link
Contributor

0-8-15 commented Oct 1, 2020

That's strange. Looks like I've been using API 26 for the past year already.

However since the recent changes to the build process, which now support arm64, the code working before does now no longer.

Mysterious.

@mgorges
Copy link
Contributor Author

mgorges commented Oct 1, 2020

The new default target is 28, if you drop that down to something lower some of the legacy pieces might kick in loaders/android/AndroidManifest.xml.in#L8. I know we used this trick initially when we had issues with the hybridapp insecure connection piece, which kind of worked but not for really new devices? That said, the Play Store will reject it so if you don't rely on that change this back to not set the target (which is what we had in the past), or set the target to the same value as the minSdkVersion?

@mgorges
Copy link
Contributor Author

mgorges commented Oct 7, 2020

I vaguely remember that we had similar issues with iOS at the beginning which we solved by become a required service, e.g. something that plays music or acts as a VoIP app, which could be declared in the manifest. https://developer.android.com/guide/components/services might have some ideas of adding a Foreground service? I can try to help but don't have an Android device available to me for testing, which makes this difficult.

@0-8-15
Copy link
Contributor

0-8-15 commented Oct 8, 2020

Looks like having fixed the androidforegroundservice to work again has dealt with the issue. Getting the events again.

@mgorges
Copy link
Contributor Author

mgorges commented Oct 8, 2020

Are those commits included in #256 or is this a different piece you are developing?

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

No branches or pull requests

2 participants