Click here to Skip to main content
15,880,972 members
Home / Discussions / Mobile
   

Mobile

 
AnswerRe: How Much Does It Cost to Design an App? Pin
Akshay Nanjunda8-Sep-20 2:40
Akshay Nanjunda8-Sep-20 2:40 
AnswerRe: How Much Does It Cost to Design an App? Pin
Mycroft Holmes29-Sep-20 12:02
professionalMycroft Holmes29-Sep-20 12:02 
GeneralRe: How Much Does It Cost to Design an App? Pin
MaryDes1-Oct-20 4:09
MaryDes1-Oct-20 4:09 
AnswerRe: How Much Does It Cost to Design an App? Pin
Millie Jack12-Oct-20 3:48
professionalMillie Jack12-Oct-20 3:48 
AnswerRe: How Much Does It Cost to Design an App? Pin
Member 150117993-Dec-20 23:43
Member 150117993-Dec-20 23:43 
AnswerRe: How Much Does It Cost to Design an App? Pin
DonutAtwork.com29-Dec-20 23:05
DonutAtwork.com29-Dec-20 23:05 
AnswerRe: How Much Does It Cost to Design an App? Pin
Member 1573184013-Sep-22 21:51
Member 1573184013-Sep-22 21:51 
QuestionXamarin Forms Async Call Never Returns Pin
Kevin Marois31-Aug-20 8:52
professionalKevin Marois31-Aug-20 8:52 
I'm trying to learn to call an Asp.Net Web API from a Xamarin Forms app. I'm testing my app using my phone plugged into my Dev PC running from VS 2019.

Here's my code so far:
private void Button_Clicked(object sender, EventArgs e)
{
    CustomerEntity customer = Test(1).Result;
}
public async Task<CustomerEntity> Test(int id)
{
    var url = "https:"  + "//localhost:44302/api/Customer/Get?Id=1";
    using (var client = new HttpClient())
    {
        client.BaseAddress = new Uri(url);
        client.DefaultRequestHeaders.Accept.Clear();
        client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

        var response = await client.GetAsync(url); // Nothing happens after this!!

        CustomerEntity cust = JsonConvert.DeserializeObject<CustomerEntity>(await response.Content.ReadAsStringAsync());

        return cust;
    }
}
I can paste the URI into a browser and get results. When I click the button on my app that calls the above, I get no response after the GetAsync.

Anyone have any idea what's going on or how to debug this?

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Xamarin Forms Async Call Never Returns Pin
Afzaal Ahmad Zeeshan31-Aug-20 17:33
professionalAfzaal Ahmad Zeeshan31-Aug-20 17:33 
GeneralRe: Xamarin Forms Async Call Never Returns Pin
Kevin Marois1-Sep-20 6:12
professionalKevin Marois1-Sep-20 6:12 
AnswerRe: Xamarin Forms Async Call Never Returns Pin
Afzaal Ahmad Zeeshan1-Sep-20 8:50
professionalAfzaal Ahmad Zeeshan1-Sep-20 8:50 
GeneralRe: Xamarin Forms Async Call Never Returns Pin
Kevin Marois1-Sep-20 11:13
professionalKevin Marois1-Sep-20 11:13 
GeneralRe: Xamarin Forms Async Call Never Returns Pin
Mycroft Holmes1-Sep-20 12:20
professionalMycroft Holmes1-Sep-20 12:20 
GeneralRe: Xamarin Forms Async Call Never Returns Pin
Angelina Brown28-Sep-20 21:31
Angelina Brown28-Sep-20 21:31 
QuestionOS crration Pin
Morgan Atechi18-May-20 4:09
Morgan Atechi18-May-20 4:09 
AnswerRe: OS crration PinPopular
Richard MacCutchan18-May-20 4:12
mveRichard MacCutchan18-May-20 4:12 
AnswerRe: OS crration Pin
ZurdoDev18-May-20 4:50
professionalZurdoDev18-May-20 4:50 
QuestionPublishing A Xamarin Forms App Pin
Kevin Marois17-Apr-20 11:03
professionalKevin Marois17-Apr-20 11:03 
QuestionHow to install Visual Studio Android Emulator in Windows 10 Home Pin
Paramu197316-Apr-20 16:41
Paramu197316-Apr-20 16:41 
AnswerRe: How to install Visual Studio Android Emulator in Windows 10 Home Pin
Richard MacCutchan16-Apr-20 21:45
mveRichard MacCutchan16-Apr-20 21:45 
GeneralRe: How to install Visual Studio Android Emulator in Windows 10 Home Pin
Paramu197317-Apr-20 1:49
Paramu197317-Apr-20 1:49 
AnswerRe: How to install Visual Studio Android Emulator in Windows 10 Home Pin
Angelina Brown28-Sep-20 22:06
Angelina Brown28-Sep-20 22:06 
QuestionHow to install Visual Studio Android Emulator in Windows 10 Home Pin
Paramu197316-Apr-20 19:43
Paramu197316-Apr-20 19:43 
Questiona pdf book mobile app Pin
Member 1472128719-Jan-20 23:32
Member 1472128719-Jan-20 23:32 
AnswerRe: a pdf book mobile app Pin
Richard MacCutchan20-Jan-20 0:36
mveRichard MacCutchan20-Jan-20 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.