ble-test-peripheral-android | A BLE Peripheral Simulator App | iOS library
kandi X-RAY | ble-test-peripheral-android Summary
kandi X-RAY | ble-test-peripheral-android Summary
A BLE Peripheral Simulator App
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ble-test-peripheral-android
ble-test-peripheral-android Key Features
ble-test-peripheral-android Examples and Code Snippets
Community Discussions
Trending Discussions on ble-test-peripheral-android
QUESTION
I've a problem with the beacon detection.
Sometimes the app is in loop through the BootstrapNotifier callbacks (didDetermineStateForRegion(int arg0, Region arg1), didEnterRegion(Region arg0) and didExitRegion(Region arg0)).
Sometimes occurs when I start the app, other times is when the app is in background... I haven't found any pattern, so by this reason I've no idea of where can be the problem.
The loop is like this (there's only a piece of the log):
...ANSWER
Answered 2017-May-24 at 19:37Two things may be causing this:
Setting such short scan periods can be problematic unless you are positive that the beacon you are testing with is transmitting at 10Hz or more. This is because 500ms is not much time to detect a packet, and the radio is off for some time when you cycle between scanning on and off. I would make the scan period longer (at least 1100ms) to see if the problem goes away.
A bug was introduced in library version 2.10 which can cause region exits in the background. I doubt it would solve the problem with such short scan periods. Try targeting library version 2.9, or you can use the instructions to try 2.11-beta1.
Some other tips:
There is no reason to call bind() when using RegionBootstrap, and it can cause problems with background mode switching if you do. You can put your customized scan period code next to where you set your BeaconParser, and then simply take out the call to
updateScanPeriods()
as it is only needed if you change scan periods after scanning starts.Background scanning periods are not used unless you activate the
BackgroundPowerSaver
class or programmatically change the background mode of the beaconManager. Unless you do one of these things, foreground scan periods will always be used.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ble-test-peripheral-android
You can use ble-test-peripheral-android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ble-test-peripheral-android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
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