Created
June 2, 2018 06:03
-
-
Save nogawanogawa/d08270a363c5929393260f4fe051bb12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BluetoothLEAdvertisementPublisher _publisher; | |
void SetupBluetoothAdvertisement() | |
{ | |
_publisher = new BluetoothLEAdvertisementPublisher(); | |
var manufacturerData = new BluetoothLEManufacturerData(); | |
manufacturerData.CompanyId = 0xFFFE; | |
var myIpAddress = GetMyIPAddress(); | |
var writer = new DataWriter(); | |
writer.WriteString(myIpAddress); | |
manufacturerData.Data = writer.DetachBuffer(); | |
_publisher.Advertisement.ManufacturerData.Add(manufacturerData); | |
_publisher.Start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment