Unable to scan for other Android phones
See original GitHub issueI’ve successfully used this library for scanning some hardware devices (BT chips ESP32, Sierra Wireless, etc.). But, I’m unable to detect other Android phones (that have Bluetooth and Location enabled).
Is there any specific configuration necessary to be added, or this is not possible to be achieved?
This is my implementation:
public synchronized void startScan() {
final ScanSettings settings = new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
.setReportDelay(1000)
.setUseHardwareBatchingIfSupported(false)
.build();
BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
try {
scanner.startScan(null, settings, scanCallback);
Log.d(LOG_TAG, "BLE start scan.");
} catch (IllegalArgumentException e) {
Log.d(LOG_TAG, e.getMessage());
}
}
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Android Not Scanning a QR Code: 7 Ways to Troubleshoot
7 ways to troubleshoot if your Android device is not scanning a QR code · Center the QR code on the screen ·...
Read more >Unable to scan for networks (wifi problem)
Go to wireless networks> mobile network options> uncheck always enable mobile network. When you go back a step to wireless networks, have both ......
Read more >6 Best Ways to Fix QR Code Scanner Not Working on Android
Step 1: Open the Camera app on your Android phone. Step 2: Tap the downward arrow icon at the top. Step 3: Tap...
Read more >Unable to Scan for Networks - Samsung Moment
Whenever I turn on WiFi, it says "Scanning", then "Unable to Scan for Networks" window pops up. Sometimes it scans just once, other...
Read more >Find & set up devices near you - Android Help
Open your phone's Settings app. Tap Google and then Devices & sharing and then Devices. Turn Scan for nearby devices on or off....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

On the other hand, iOS devices do advertise without any app, as they use it for AirDrop. Apps can customize and add their data to the packet, but even without them the phone will advertise. Same with Macs with support for BLE.
Yes, you need to advertise in an app. We recommend nRF Connect for Android, available on Google Play, where you can customize the advertising packet in UI.