0

I am very new to android .Can anyone please help me how to get mobile details of my android phone to servlet im using samsung galaxy.I should not use browser .I should get details from my android application please help me out thanks in advance

rahul the great
  • 271
  • 2
  • 4
  • 6
  • To get phone details: http://stackoverflow.com/questions/3596722/how-to-get-the-android-phone-model-version-sdk-details – Harry Joy Feb 28 '11 at 05:51

1 Answers1

0

You can use the Build class to get information about the device and OS.

Update: See this code fragment;

// connect to the servlet
String location = "http://www.foo.com/servlet/TestServlet";
URL testServlet = new URL( servletLocation );
URLConnection servletConnection = testServlet.openConnection();

// inform the connection that we will send output and accept input
servletConnection.setDoInput(true);
servletConnection.setDoOutput(true);

// Don't use a cached version of URL connection.
servletConnection.setUseCaches (false);
servletConnection.setDefaultUseCaches (false);

// Specify the content type that we will send binary data
servletConnection.setRequestProperty
("Content-Type", "<insert favorite mime type>");

// get input and output streams on servlet
. . .

// send your data to the servlet
. . .

See this article for details. Change it as per your needs.

Mudassir
  • 13,031
  • 8
  • 59
  • 87