Cierniostwor
Cierniostwor

Reputation: 449

Xamarin DisplayAlert not work on android live player

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.

Upvotes: 0

Views: 51

Answers (1)

Billy Liu
Billy Liu

Reputation: 2168

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");

Upvotes: 0

Related Questions