user716998
user716998

Reputation: 11

android simple server-client implementatiom

I am new to android development, and would like to do an application that pulls data from a server, is there any straight-forward and to the point tutorial that I can use?

Upvotes: 1

Views: 312

Answers (3)

Helal Khan
Helal Khan

Reputation: 887

You can use this method to pick data from server then you convert the inputs trim to string then you can parse for further use.`

public static InputStream getUrlData(final String url)
        throws URISyntaxException, ClientProtocolException, IOException {
    final DefaultHttpClient client = new DefaultHttpClient();
    final HttpGet method = new HttpGet(new URI(url));
    final HttpResponse res = client.execute(method);
    return res.getEntity().getContent();
}

`

Upvotes: 1

Vinay Bedre
Vinay Bedre

Reputation: 466

You can use DefaultHttpClient for this approach.

Take a look at this

Check out this link

Upvotes: 0

mc_fish
mc_fish

Reputation: 503

its easy to do that with Andorid, just use a rest service and you are on your way

http://www.vogella.com/articles/AndroidJSON/article.html

http://timewasted.net/?p=127

Upvotes: 0

Related Questions