if (url.startsWith("btl2cap://localhost:")) {
int endIndex = url.indexOf(';');
String psmString = url.substring(20, endIndex);
Short psmShort = Short.decode(psmString);
short psm = psmShort.shortValue();
return new JSR82ConnectionNotifier(psm);
}
if (url.startsWith("btl2cap://")) {
byte[] bdAddrBytes = new byte[12];
String bdAddrString = url.substring(10, 22);
Long bdAddrLong = Long.decode("0x" + bdAddrString);