Hi,
In UWP app, I am using Rfcomm for connecting apps to each other. In some cases, I need to update SDP attributes after Rfcomm starts advertising.
I am able to remove previous records and add new SDP attribute, but they are not reflecting on the client devices.
Code using for this:
private void InitializeServiceSdpAttributes(RfcommServiceProvider rfcommProvider, string Details)
{
var sdpWriter = new DataWriter();
// Write the Service Name Attribute.
sdpWriter.WriteByte((4 << 3) | 5);
// The length of the UTF-8 encoded Service Name SDP Attribute.
sdpWriter.WriteByte((byte)Details.Length);
// The UTF-8 encoded Service Name value.
sdpWriter.UnicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf8;
sdpWriter.WriteString(Details);
rfcommProvider.SdpRawAttributes.Remove(0x100); //Remove previous
// Set the SDP Attribute on the RFCOMM Service Provider.
rfcommProvider.SdpRawAttributes.Add(0x100, sdpWriter.DetachBuffer()); //Add new
}
This code does not give any error, it runs smoothly but values not reflecting on client machines.
Is there any other event for updating SDP attributes?
Regards,
Abhishek