Does anyone currently use Xamarin framework for development? Its supposed to enable you develop cross platform with c# but some C# code i use in a console app that works properly doesnt work in Xamarin.

Wandering if anyone has got that sorta issue.

  1. Don't use C#.
  2. See #1.
  3. See #2...

Snark aside, I don't use C# and .NET tools because MS can change the rules for them any time they want.

I don't use it.
Mostly develop small things for my own in VS2010 C#,C++,Python,F#.
@rubberman: Could you elaborate on what you mean by the rules of MS?

What code are you using? You might be trying to use something specific that Xamarin can't use cross-platform.

I have a php script that returns "success" if the values exist in the database.

                string x = Username.Text;
                string y = Password.Text;

                WebClient client = new WebClient();
                Uri uri = new Uri("http://tobytheitguy.com/login.php");

                NameValueCollection parameter = new NameValueCollection();
                parameter.Add("username",x);
                parameter.Add("password",y);
                var res = client.UploadValues(uri, parameter);
                var g = Encoding.UTF8.GetString(res);
                response.Text = g;
                Toast.MakeText(this,g,ToastLength.Long);

So i expect my 'response' view to show 'success' along with a toast notification but it doesnt do anything.

Tried the same thing with RestSharp

                var client = new RestClient();
                client.BaseUrl = new Uri("http://10.0.2.2:24122");

                var request = new RestRequest("api/User/{u}/{p}");
                request.Method = Method.GET;
                request.AddUrlSegment("u",Username.Text);
                request.AddUrlSegment("p",Password.Text);
                request.RequestFormat = DataFormat.Json;
                IHttpResponse<user> rep = client.Execute<user>(request);

                response.Text = rep.Data.username;

But this time i used GET with a different url scheme and a soap webservice.

Yet nothing.

It doesnt react at all. Doesnt throw an error. Ive tried a bunch of other ways

Yet nothing.

And each method works on a console app. Its just strange.

Note: the '10.0.2.2' maps to my PC's localhost. So thats not the issue.

So i got this working. My code was right the issue was that i had a proxy configured on my pc somehow. So i used netsh on the command line to reset it.

Hope this helps somebody.

Oh and i must say, it took me 2 months to figure that out. :(

This question has already been answered. Start a new discussion instead.