Pessoal,
Eu estou tentando verificar quais são os serviços de Bluetooth disponiveis em um celular. Eu consigo acessar várias informações, mas estou tendo problemas em pegar o ServiceID.
Esse é o código que estou utilizando:
dataelement = a_javax_bluetooth_ServiceRecord_fld.getAttributeValue(3);
if(dataelement != null && dataelement.getDataType() == 24 && k1++ >= 0)
{
UUID uuid = (UUID)dataelement.getValue();
String serviceId = "0x" + uuid.toString();
k += org.klings.wireless.j2me.Printer.printFormatedText("ServiceId:", 2, k, 20, a_javax_microedition_lcdui_Font_fld, f - 2, g1);
k += org.klings.wireless.j2me.Printer.printFormatedText(serviceId, 5, k, 20, b_javax_microedition_lcdui_Font_fld, f - 5, g1);
}
if(k > g)
{
return;
}
Acredito que o problema possa ser o Type do ServiceID, mas não tenho certeza. Alguém pode me ajudar?
Muito obrigado!!
Fábio