android - How to bypass bluetooth pairing dialog in LG nexus 4 (E960)? -
i connecting embedded bluetooth device lg nexus 4 in application using following code
private void pairdevice(bluetoothdevice device) { bluetoothsocket tmp = null; try { tmp = device.createinsecurerfcommsockettoservicerecord(uuid .fromstring("<uuid of embedded device>")); } catch (ioexception e) { log.e("log_tag", e.getmessage()); e.printstacktrace(); } log.v("log_tag", "socket found"); try { tmp.connect(); log.v("log_tag", "connected"); } catch (ioexception e) { log.e("log_tag", e.getmessage()); e.printstacktrace(); } }
its working fine in other devices samsung galaxy grand when trying lg nexus 4 shows me dialog 2 options pair or cancel , not want should directly connect device. please me.
Comments
Post a Comment