I have a fairly basic application that I wrote in C# NET some time ago and would like to rewrite it for the Android platform. It just uses an API exposed by some web software, and I can access it with just a WebClient in .NET.
I found the WebKit (android.webkit | Android Developers) but just from looking that doesn't seem appropriate.Code:WebClient myClient = new WebClient(); //Prepare a Name/Value Collection to hold the post values NameValueCollection form = new NameValueCollection(); form.Add("username", "bob"); form.Add("password", GetMD5Hash("mypass")); form.Add("action", "getusers"); // POST data and read response Byte[] responseData = myClient.UploadValues("https://mysite.com/api.php", form); string strResponse = Encoding.ASCII.GetString(responseData);
Does anyone have any sample code of how to port this over?


LinkBack URL
About LinkBacks
Reply With Quote
