-
-
Notifications
You must be signed in to change notification settings - Fork 744
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 app can not discover any device by scaning function #1206
Comments
now ,i find a new case. |
So probably is a device problem. |
Don't think it's a library bug. For that scanning you should do:
And afterwards when scan is not running
|
I began with the example provided in the library and encountered a similar problem as @yinghuochongfire . The scan function doesn't seem to work until I attempt it with companionScan. Once a device is discovered, I can close the app and then try scan again, and it works. Smartphone (please complete the following information): Device: MI 10T |
I have a related issue in Android. When launching the app, it asks for permission, and I grant it, but the scan is not working. I checked the phone settings, and the permissions are granted. When I toggle the permission off and then on again from my physical device's settings, the scan works perfectly. So, the permission needs to be granted from the physical device settings. Device: MI 11X |
Thank you for this!! You'll also need to add:
to your manifest if you haven't, in order to get |
Just want to chime in the exact situation as described by @yinghuochongfire happen to me today. I scratched my head all day as handleDiscoverPeripheral just can't catch any result from a scan, no matter what I tried, but once I did a successful companion search, subsequent scan will be magically successful. And I can't even reproduce the original problem anymore, as if the device can't "unseen" the device. It might be a good idea to test it with another phone, but I don't have one at the moment. I don't think the original problem is solved, something still not right before we did the companion search. |
Describe the bug
in most case,android app can work well.
but, sometimes, android app can not discover any device by scaning device.
when i try to restart my phone, and run the app again, the app works well again, it can discover device quickly.
scan device.txt
when i exit my app and restart my app again,This situation is often repeated.
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: