connection - Ble Device not connect to peripheral randomly android -
i'm using ble service connect peripheral have strange problem connection times following method not connect device , times works ratio 10:1
private void scanledevice(final boolean enable) { if (enable) { mhandler.postdelayed(new runnable() { @override public void run() { mbluetoothadapter.stoplescan(mlescancallback); connecttoperipheral(); } }, 15000); mbluetoothadapter.startlescan(mlescancallback); } else { mbluetoothadapter.stoplescan(mlescancallback); } } method connecttoperipheral connection , data receiving,i stuck problem since long time don't have idea why happening if kill app connect still have same problem.is problem of advertising delay?
Comments
Post a Comment