chipweinberger / flutter_blue_plus

Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android, iOS, macOS
Other
768 stars 465 forks source link

Update FlutterBluePlusPlugin.java #975

Closed hiperioncn closed 2 months ago

hiperioncn commented 2 months ago

Fix issue: ANDROID scan permission popup appears twice

chipweinberger commented 2 months ago
  1. have you tested it? please share a video recording
  2. please remove commented out code
hiperioncn commented 2 months ago

Test video recording [

https://github.com/user-attachments/assets/33e5a5c1-b6fa-4c5c-9bd8-f06a97dc6dec

]

chipweinberger commented 2 months ago

I've updated FBP with this fix: https://github.com/chipweinberger/flutter_blue_plus/commit/1264f68afc47db2c08fdd0a7d3eca3f9982de40b

note: you'll need to call startScan first in your code to ask for both SCAN & CONNECT permission. If you just call FlutterBluePlus.systemDevices we will only ask for the CONNECT permission.

hiperioncn commented 2 months ago

Thanks, I've already request both SCAN&CONNECT permission before scan devices.

chipweinberger commented 4 weeks ago

your code caused a new problem: https://github.com/chipweinberger/flutter_blue_plus/pull/1013