question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does device scan work when phone is locked?

See original GitHub issue

Hello!

I use react-native-ble-plx to scan devices and it works well while the phone isn’t locked. When I lock the phone the scan stops. After device is unlocked scan works again.

So is it possible to scan BLE devices while the phone is locked?

I use LowLatency mode for scanning and phone with Android 10.

{ scanMode: ScanMode.LowLatency }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
dariuszseweryncommented, Dec 23, 2020

Filters adequate for the advertisement of the peripheral you are interested it. You cannot “scan everything” in the background because it may be used to locate the user.

1reaction
qiraycommented, Dec 23, 2020

@dariuszseweryn, I added android.permission.ACCESS_BACKGROUND_LOCATION to AndroidManifest.xml and enabled “Allow all the time” in settings but it seems to have no effect. What filters and permissions should I add to make it work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does device scan work when phone is locked? #791 - GitHub
Hello! I use react-native-ble-plx to scan devices and it works well while the phone isn't locked. When I lock the phone the scan...
Read more >
Does NFC Work When The Phone Is Off Or Locked ...
It is technically possible to scan NFC tags while your phone is screen locked. However, enabling the NFC reader without unlocking can cause...
Read more >
NFCScreenOff mod enables scanning NFC tags when your ...
NFCScreenOff is a Magisk module that enables scanning NFC tags even when your Android smartphone is locked. Read more about it here!
Read more >
Scan for peripherals when device is locked - Stack Overflow
As a bluetooth-central background app, you should be able to continue scanning when the device is locked, but only if you are scanning...
Read more >
Unlock your Android device to verify it's you - Google Support
You can only verify it's you with your fingerprint that already unlocks your device. Make sure you're using the same finger you normally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found