I've an android Application. I have to connect with an online D.B. on the web. All i understand is the fact that i must make use of a Web Service, placed on the remote DB server.

Whith my Android Application i must connect to the net service, and also the web service is going to do the logical procedures to obtain the necesary data in the D.B. and can send these to me.

OK, the net service isn't a problem, i've got a friend that is going to do it (i've no clue about web services), however i have no idea how i must perform the connexion using the Web Services, as well as i have no idea how need to be the functions from the Web Service.

i have to do select's that provide me multiple rows of knowledge, and chooses, then i must send data towards the Webservice (the parameters from the "choose and also the place"), i supose it's only to call a purpose of the webservice with normal parameters? or it's more hard than this?. I've looked for lessons that demonstrate me to achieve that on the internet however i can't find the best tutorial that demonstrate how to achieve that...

can someone produce just a little help? for instance, a great tutorial for novices hooking up android to some remote DB with webservices?

thanks

This tutorial will let you. I understand this is guaranteed as i made use of this to have an application that i'm focusing on: Try this You will find a couple of errors within the code. I'll list the corrections you have to make.

Should you browse the comments below you can observe where individuals have found issues with the code, only one i observed is the fact that you will find a lot of "" in the finish. For out among individuals "" it will work fine. In my opinion the "" at line 43 could be removed.

Also, there's another error that you could fix: Take a look at line 13, remove "InputStream" before "is = entity.getContent()" Now exceed the very first try block and put this declaration: InputStream is

Which should correct all of the problems.

Tell me how that calculates for you personally. For those who have any queries, tell me.

You are able to connect to the net while using below code and obtain the information like a string,most likely data send to you'll be as JSON or XML which you'll parse.

Concerning how to connect with the webservice just provide the url that the are hooking up to and pass parameters.

ie. String urlstr = "www.yoursite.com/api.php?parameter1="+parameter1+"&parameter2="+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 provide a obvious idea regarding how u may use internet data inside your application.

well...if u still havent found a solution...most likely this tutorial may help.. http://www.ibm.com/developerworks/xml/library/x-dataAndroid/
Hope this can help.. :)