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

Use scan filters on Android 14 when the screen is off #1176

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

davidgyoung
Copy link
Member

@davidgyoung davidgyoung commented Dec 5, 2023

This appears to be necessary on a Pixel 7 running Android 14. Is this real? Tests in #1174 show that only the Pixel 7 (not the 6a) has this issue on Android 14.

I see no official mention of it. Is this in the AOSP code, or is this a Pixel-specific change?

Tests show that the app has to target Android 14 of the problem to come up (setting targetSdk to 33 will NOT cause the problem to show up on Android 14.)

@mushusax
Copy link

mushusax commented Jan 8, 2024

Interestingly I did have problems even with target 33 and even pixel6A.
That being said, this PR did seem to do the trick.
Please upload the Gradle binary when you think it's ready. Thanks!

@TadashiSatoo
Copy link

@davidgyoung
Hi, I'm Tadashi Sato.
Thank you as always.

I had the screen off issue as well.
But I solved it using this PR.

When will this PR be merged?
I hope it will be released soon.

Thanks for your cooperation.

@davidgyoung
Copy link
Member Author

davidgyoung commented Jan 31, 2024

Hi, @TadashiSatoo. Can you please tell me the device model and Android version where you witnessed trouble detecting beacons with the screen off, and where this change fixed the issue for you?

The only reason this has not been merged is because I am unsure whether the logic I have for when to enable the scan filters is correct. I need more reports from people like you to tell me exactly what device models and Android versions where this change is necessary. Only once I am confident that the logic is correct and that the change will not likely cause problems on some devices can this be put into a release.

Any info on your tests is appreciated.

@TadashiSatoo
Copy link

Hi @davidgyoung
Thank you for reply.

I had happned issue for Pixel device.

  • Pixel8 Android14
  • Pixel7 Android14

My function scans for beacons in the background to connect and send commands to devices.
But does not work my function on Pixel7,8(Android14).

So, I merged this PR on my function.
My function resolved this issue.

I merged this PR on my function and tested on all devices I had.
Result is all devices no problem.

  • Pixel8 / Android14:OK (issue resoleved)
  • Pixel7 / Android14:OK (issue resoleved)
  • Pixel5 / Android14:OK
  • Pixel4a / Android13 : OK
  • Aquos sense6 / Android13:OK
  • Galaxy A53 5G / Android13 : OK
  • Pixel4a / Android12 : OK
  • Xperia XQ-AS42 / Android12 : OK
  • Galaxy S10 / Android12 : OK
  • Xperia SO41B / Android11 : OK
  • HUAWEI p10 / Android10:OK
  • motoroller / Android10:OK
  • OPPO / Android10:OK
  • OPPO RenoA / Android9:OK

I hope this PR merged as soon as possible.

Thank you for you support.
Best regards.

@davidgyoung
Copy link
Member Author

Wow, thank you for those tests, @TadashiSatoo. I added a comment to the root issue #1174 today where I confirmed the change in AOSP, so I do not think there is any reason not to merge this MR. I will roll an official release within the next two days.

@davidgyoung davidgyoung merged commit 16d09c2 into master Feb 1, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants