android - API for advertising secondary ble service on device(Peripheral mode) -


from docs,it seems there 2 types of ble(bluetooth low energy)services-primary , secondary.a secondary service included in primary service,kind of nesting service inside other service.however didnt find api create secondary service , advertise it.

whenever use following code advertising service,the service gets added primary service.

 new advertisedata.builder()                // .setincludedevicename(true)                 .addserviceuuid(new parceluuid(deviceprofile.service_uuid)) 

is there way specify type of service, when advertising it?i have being trying build app advertise secondary service , client app connect secondary service , read data.please let me know if know workaround it.i have done lot of research not find anything.

thanks in advance.

after advertising can this:

bluetoothgattservice service = new bluetoothgattservice(serviceuuid,bluetoothgattservice.service_type_secondary);     service.addcharacteristic(characteristic);     mgattserver.addservice(service); 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -