kandi X-RAY | smart-lock Summary
kandi X-RAY | smart-lock Summary
smart-lock
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send a string to the LCD
- Send a single byte to the data pins
- Enable enable mode
smart-lock Key Features
smart-lock Examples and Code Snippets
Community Discussions
Trending Discussions on smart-lock
QUESTION
I have a Danalock V3 Smart Lock. It's working as advertised, but I want my own Android application to detect whenever I come in-range of this device. So my application needs to be "constantly aware" of whether the device is in-range or not. My question is: is this feasible? If yes, how?
As far as I can tell, the device is not bonded to the phone. If I iterate through the list of bonded devices, it doesn't show:
...ANSWER
Answered 2022-Feb-01 at 07:41This is a bit tricky because theoretically, it should be doable. As Michael Kotzjan said, as long as you know the name of your device (e.g. using nRF Connect), you can continuously scan for this name in the background mode and then as soon as you detect it, you can get a notification in your Android app. The whole BLE beacon technology works like this so it's certainly doable.
Practically, you will be facing a few challenges when it comes to BLE background mode. Since Android P, the OS has an adaptive battery optimisation feature that might kill off some apps in the background. There are a few ways around this but it will not be completely straight-forward. Have a look at the links below which cover the subject in more detail:-
- Beacon scanning in background - Android O
- Is it possible to share data between Android devices when screen is off
- The Ultimate Guide to Android BLE Development (specifically check "Staying connected in the background")
- Background scanning on Android 8+
- Background BLE scan in doze mode on Android devices
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install smart-lock
You can use smart-lock like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page