how to clear the service and charactoristics discovering cache in the andriod ble4.0. 如何清除蓝牙discovery 的缓存。
i try closeing the bluetooth through the andriod settings to clear the cache ,but failed.
is there any other way to clear the cache.
my sensor has service A ,servic B and service C.
i connect the sensor with a adriod phone. it work good.
and i remove the service C from the code of my sensor.
i connect the sensor with the same andriod phone , the phone still can discover the service C.
i know that the andriod discovering will cache the services of the sensor, and reuse the cache when the same sensor connected.
i change the sensor's service, the service C is already not exist in my sensor, but service C still in the cache, and not be update.
我的传感器中有服务A,B,C。
传感器连接了andriod上位机,并可以正常工作。
然后我修改了传感器代码,删除了服务C。
在传感器再连接原来的andriod上位机后,上位机没有从传感器发现新的服务和属性状态,而是使用了上次连接缓存的服务属性。以至于上位机仍能发现服务C。而这个服务在当前的传感器中已经不存在了。
如何能清楚andriod上位机的缓存。
我尝试关机,关蓝牙,都不行。
有什么系统设置可以清除蓝牙发现的缓存么
或者andriod 蓝牙api可以调用,清除蓝牙的缓存?
谢谢。
我也遇到这个问题了,目前解决方法是重启手机