Hello,
Welcome to Microsoft Q&A!
I test your code and got the error below
The error happens because From Android 9 Http is treated as insecure connection, to enable it we need to modify the config in android project .
Workaround
Add [assembly:Application(UsesCleartextTraffic =true)]
in AssemblyInfo.cs
.
Refer to https://forums.xamarin.com/discussion/comment/388862/#Comment_388862 .
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.