Gurus, I am a lil lost on this topic. Here\'s a breakdown of what I\'m trying to do.
[User/Android Device] sends location info to a server -> [server]
[serv
call the following method to connect to any url and read response data from it. What so ever the URL you will hit. Url will be of any php or asp or jsp page or in any server side scripting language. The following method has nothing do with it. what so ever the url page will return that will be entered in your Log records. check Log cat for read result
private void connectToServerAndReadData()
{
HttpURLConnection conn;
boolean result = false;
try{
// Enter any URL here you want to connect
URL url = new URL("http://php1.funnymedialinks.com/scribd/rcheck.php");
// Open a HTTP connection to the URL
conn = (HttpURLConnection) url.openConnection();
// conn.connect();
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line ;
while ((line = rd.readLine()) != null) {
Log.v("Readed Data from Server ","data- "+line);
}
rd.close();
}catch(MalformedURLException e){
e.printStackTrace();
}
catch(IOException e){
e.printStackTrace();
}
catch(Exception e){
e.printStackTrace();
}
}