chipweinberger / flutter_blue_plus

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

[Help]: empty scan results #1041

Closed Johnjson closed 2 weeks ago

Johnjson commented 3 weeks ago

Requirements

Have you checked this problem on the example app?

No

FlutterBluePlus Version

^1.32.12

Flutter Version

Flutter version 3.19.5

What OS?

Android

OS Version

android 32

Bluetooth Module

scan

What is your problem?

I can't scan nearby Bluetooth devices with this permission 。 But remove android:maxSdkVersion="30" This part can search for Bluetooth devices. Why

Logs

<startScan> args: {with_services: [], with_remote_ids: [], with_names: [], with_keywords: [], with_msd: [], with_service_data: [], continuous_updates: false, continuous_divisor: 1, android_legacy: false, android_scan_mode: 2, android_uses_fine_location: true}
D/[FBP-Android]( 3796): [FBP] onMethodCall: startScan
I/LifecycleTransaction( 3796): activityCallbacks TopResumedActivityChangeItem{onTop=false}
I/LifecycleTransaction( 3796): lifecycleStateRequest PauseActivityItem{finished=false,userLeaving=true,configChanges=0,dontReport=false}
I/TopResumedActivityChangeItem( 3796): execute start, ActivityClientRecord = ActivityRecord{79b9e5b token=android.os.BinderProxy@35852a7 {com.ql.star/com.example.ql.MainActivity}}
I/HwViewRootImpl( 3796): remove sceneId 10 topId: 0
I/flutter ( 3796): LogUtils d  2024-11-04 09:53:41   didChangeAppLifecycleState  inactive
I/LifecycleTransaction( 3796): activityCallbacks TopResumedActivityChangeItem{onTop=true}
I/TopResumedActivityChangeItem( 3796): execute start, ActivityClientRecord = ActivityRecord{79b9e5b token=android.os.BinderProxy@35852a7 {com.ql.star/com.example.ql.MainActivity}}
D/ActivityThread( 3796): Won't deliver top position change in state=4
I/RmeSchedManager( 3796): init Rme, version is: v1.0
I/LifecycleTransaction( 3796): activityCallbacks ActivityResultItem{resultInfoList=[ResultInfo{who=@android:requestPermissions:, request=1452, result=0, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }}]}
I/LifecycleTransaction( 3796): lifecycleStateRequest ResumeActivityItem{procState=2,updateProcState=true,isForward=true}
I/HwViewRootImpl( 3796): Add sceneId 3 topId: 0
D/ZrHung.AppEyeTransparentWindow( 3796): TransparentWindow mHungConfigStatus = 0,mHungConfigEnable = 1
chipweinberger commented 2 weeks ago

I think this is just a local bug in your setup. Other people seem to have no problems.

please reopen if you have more details / a PR