I'm developing a remote app that sends commands via http. Normally I type in a link in a browser and the command will work. With Android, I would like it to work with a press of a button. I tried the following code and it didn’t work:
URL url = new URL(urlString); URLConnection connection = url.openConnection(); connection.setDoOutput(true); OutputStreamWriter out = new OutputStreamWriter (connection.getOutputStream()); out.write(urlString); out.close(); "urlstring" is the http command link. Any ideas? Am I on the wrong track? I'm confused because technically I don't need to write anything to the link. I would think it would work if I just open the connection. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---