This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

On android, I measure real time sensing data over notification from BLE device. By default, I get the notify data 1 time per second. However, I want to delay getting data from devices in a certain period.

I am developing an android application to get real-time temperature over BLE notification. Currently, I receive the temperature sensing data 1 time per second. Based on the app requirement from my company, I have to allow user to adjust the period to get the temperature from the device. 

  • If the device you're working with is from a 3rd-party, there's nothing you can do about the frequency of the notifications. If your app is not interested in the notifications for a given time period, then you can simply unsubscribe and resubscribe later.

    If you want to get the temperature more often, a workaround could be to read the value of the characteristic directly instead of waiting for the device to send you a notification. However, if the device only updates the value of the temperature (in the characteristic) once a second, then there's definitely nothing you can do about it. You can't force an arbitrary behavior on a 3rd-party device.

    If your company also develops the device, then you should ask the embedded developers to allow for these kinds of configurations somehow.

Related