Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I answered a question on Aug 6th, C# Rest web service and Android Client

I had some general information that I provided in the answer that I would like to retrieve.

share|improve this question
up vote 1 down vote accepted

Hi, you probably found something that works, but i stumbled accross this thread, and for others, following can be useful.

I prefer REST application using with MVC and Android. (good video-tutorials)

To create a Server:

h t t p : / /

public class TestingController : Controller {
    /// <summary>
    /// Test
    /// </summary>
    /// <returns></returns>
    public ActionResult GetString() {
        return Content("A Result <orasxml id='testid'/>");

And set Global.asax:

//Test routes.MapRoute("test", "{Page}.Mvc/tester", new { controller = "Testing", action = "GetString", Page = defaultPage });

Andoid Client development code exampels:

h t t p : / /

public String GetData(){

    //Note, do not use http:// in host name. I did not get localhost-adress working, but
    //hosted a page in IIS instead, and it worked.
    HttpHost target = new HttpHost("www.example,com",80);
    HttpGet get = new HttpGet("/tester");
    String result=null;
    HttpEntity entity = null;
    HttpClient client = new DefaultHttpClient();
    try {
        HttpResponse response=client.execute(target, get);
        entity = response.getEntity();
        result = EntityUtils.toString(entity);
    } catch (Exception e) {
    } finally {
    if (entity!=null)
    try {
    } catch (IOException e) {}
    return result;


    //Display on buttontext, must create buttoon with ButtonReload as id...
    final Button btn = (Button) findViewById(;

Tips about designing REST for Android:

h t t p : / /

h t t p : / /

General Android help:

h t t p : / /

h t t p : / /

share|improve this answer
Any chance you feel that the question should not have been deleted? (Like referring to User systematically deleting and re-posting questions, or Does systematic self-deleting need to be prevented?) – Arjan Mar 4 '11 at 11:41
@Arjan based on Jeff's new measure, it is fair game for undeleting, I think – RichardTheKiwi Mar 4 '11 at 11:43
Being <10k, I cannot see the deleted question. Just trying to make sure the user is not doing this for each question. The answer above seems a bit too long to be deleted with just one click of the question asker. Maybe you can flag the question to have the moderators see if this is standard behaviour for this user? – Arjan Mar 4 '11 at 11:47
@Arjan - Per G is the user who answered. 2 upvotes. The questioner was a joker whose account is no longer (gray user name) – RichardTheKiwi Mar 4 '11 at 11:49
Ok, good. I use this answer for refference, I have not porgrammed android for a while, but will be sooner or later. I could have this info somewhere else, but others might find it useful aswell. – Per G Mar 31 '11 at 8:27
@Per G // FYI the question has been undeleted a while ago – RichardTheKiwi Mar 31 '11 at 8:29
Yes I saw. Thanks – Per G May 4 '11 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .