I have an android APP. I need to connect to a remote D.B. on the internet. All i know is that i have to use a Web Service, installed on the remote DB server.
Whith m
You can connect to the web using the below code and get the data as a string,probably data send to you will be in the form of JSON or XML which you can parse.
Regarding how to connect to the webservice just give the url that your are connecting to and pass parameters.
String urlstr = "www.yoursite.com/api.php?parameter1="+parameter1+"¶meter2="+parameter2;
URL updateURL = new URL(urlstr);
URLConnection conn = updateURL.openConnection();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(100);
int current = 0;
while((current = bis.read()) != -1){
baf.append((byte)current);
}
String html = new String(baf.toByteArray());
this link might give a clear idea as to how u can use internet data in your application.