android - Continuously Scan Bluetooth Devices -



android - Continuously Scan Bluetooth Devices -

i've written below code continuously scan bluetooth devices based on solution provided in link. according solution, device should continuously scan/search bluetooth devices in range, in case scan happens ~64 seconds.

i've tested code on 2 devices, 1 android v2.2 , other v2.3, both devices scan ~64sec.

how create device scan continuously?

public void onreceive(context context, intent intent) { string action = intent.getaction(); if(bluetoothdevice.action_found.equals(action)){ //do }else if(bluetoothadapter.action_discovery_finished.equals(action)){ btadapter.startdiscovery(); } }

android bluetooth

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -