private async void WriteValueAsync()
{
try
{
var result =
await
_userDialogs.PromptAsync("Input a value (as hex whitespace separated)", "Write value",
placeholder: DescriptorValue);
if (!result.Ok)
return;
var data = GetBytes(result.Text);
_userDialogs.ShowLoading("Write characteristic value");
await Descriptor.WriteAsync(data);
_userDialogs.HideLoading();
RaisePropertyChanged(() => DescriptorValue);
Messages.Insert(0, $"Wrote value {DescriptorValue}");
}
catch (Exception ex)
{
_userDialogs.HideLoading();
_userDialogs.ShowError(ex.Message);
}
}