Create a simple Android Project with a referenced .net standard project (called shared for the sake of this example).
Android App contains activity with one button
.net standard project contains a class with the following function
public class testclass {
public async System.Threading.Tasks.Task test()
{
using (var client = new HttpClient())
{
//replace uri with your own
var uri =
http://10.0.0.52/PiranaDev/api/MobileProProxy/ReturnLocationsLookuplocation=Shire";
try
{
var result = await client.GetStringAsync(uri);
return result;
}
catch (Exception ex)
{
}
}
return "";
}
}
}
Steps to Reproduce
public class testclass { public async System.Threading.Tasks.Task test()
{
using (var client = new HttpClient())
{
//replace uri with your own
var uri =
http://10.0.0.52/PiranaDev/api/MobileProProxy/ReturnLocationsLookuplocation=Shire";
try
{
var result = await client.GetStringAsync(uri);
return result;
}
catch (Exception ex)
{
}
}
return "";
}
}
}