0

I use DisplayAlert in my project for displaying content of page, it works on UWP(universal Windows) local machine. But when i try to use this application on Xamarin live player on Android my button does not want work. my code in button_Clicked:

WebClient myWebClient = new WebClient();
Page p = new Page();
byte[] myDataBuffer = myWebClient.DownloadData(URL);
var download = Encoding.ASCII.GetString(myDataBuffer);                 
p.DisplayAlert("page:", download, "close");

Difrent button without DisplayAlert works well in Live player.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Cierniostwor
  • 339
  • 2
  • 4
  • 15

1 Answers1

0

The live player has many limitations. It's better to test your app on an emulator or test it on a real device through a USB-cable.

And I think you should just call this.DisplayAlert("page:", download, "close") instead of p.DisplayAlert("page:", download, "close");

Billy Liu - MSFT
  • 2,168
  • 1
  • 8
  • 15