bluecove android populateServicesRecordAttributeValues

32 views
Skip to first unread message

ieee8023

unread,
Nov 9, 2012, 11:18:46 PM11/9/12
to bluecove-...@googlegroups.com
Hey,

So my goal is to get service records on android without root. When bluecove does SDP I can't get any service records with the public api.

There is a method in BluetoothStackAndroid here:

public boolean populateServicesRecordAttributeValues(ServiceRecordImpl serviceRecord, int[] attrIDs)..{ 
// TODO: is this correct and best thing we can do? 
return false; 
}

is called with it's attrIDs array full of 4 values. I am questing for those values converted to attributes. So I looked at the impl for the maxosx stack and there is this line which calls a native function the other impls call similar native methods.

byte[] blob = getServiceAttributeImpl(address, serviceRecord.getHandle(), id);

Do any of you know a good way to solve this? What steps I should take next? I'm going to browse the android native apis next.

The core of what I'm trying to do is get the service name attribute.. in case you know a shortcut.

-J

 

Mina Shokry

unread,
Nov 10, 2012, 12:02:13 AM11/10/12
to Bluecove Emails
Hello,

If I had found a way of that, I would have implemented this method!
Unfortunately, Android doesn't provide any APIs for accessing service records. Android public APIs are missing many details. Also accessing bluez native APIs isn't a very good idea because 1) it doesn't work on all devices, 2) even on devices it works on, it needs root privileges to create a service record.

If you found a better way to do that, we would appreciate your contribution.


 

--
You received this message because you are subscribed to the Google
Groups "bluecove-developers" group.
For more options, visit this group at
http://groups.google.com/group/bluecove-developers

Reply all
Reply to author
Forward
0 new messages