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

Duplicate Location Service Enabling Prompt on Android 12 Device #18

Closed
NoelChew opened this issue Nov 5, 2022 · 3 comments · Fixed by #19
Closed

Duplicate Location Service Enabling Prompt on Android 12 Device #18

NoelChew opened this issue Nov 5, 2022 · 3 comments · Fixed by #19
Assignees
Labels
bug Something isn't working

Comments

@NoelChew
Copy link
Contributor

NoelChew commented Nov 5, 2022

Prompt to enable location service is shown twice on Android 12 devices. Clicking "OK" twice will cause app to crash.

Steps to reproduce crash:

  1. Disable device Location Service
  2. Disable Bluetooth
  3. Kill app
  4. Start app
  5. Enable Bluetooth
  6. Click "OK" to enable Location Service
  7. Click "OK" to enable Location Service (again)

Logcat:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=598333496, result=-1, data=Intent { (has extras) }} to activity {quevedo.soares.leandro.blemadeeasy/quevedo.soares.leandro.blemadeeasy.view.MainActivity}: java.lang.IllegalStateException: Already resumed, but proposed with update true

@NoelChew
Copy link
Contributor Author

NoelChew commented Nov 5, 2022

I found out that the ScanDeviceFragment calls onStop() when requesting to enable Bluetooth Adapter for my Android 12 device. This does not happen for my other devices. After selecting "Deny" or "Allow", the fragment will call onStart() again, which includes the call to requestPermission().

@LeandroSQ
Copy link
Owner

Thank you for you finding and contribution!

I've added a comment on your PR, I'm planning on include it and the legacy device fix on the next release, and hopefully get it published by EOW.

@LeandroSQ
Copy link
Owner

Fixed on v1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants