DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 2 of 2

Thread: HTTP POST Help

  1. Junior Droid
    jsg7377's Avatar
    Member #
    Join Date
    Dec 2009
    Rochester, NY
    Motorola Droid

    Lightbulb HTTP POST Help

    I have rigged up a remote start system for my Droid using a WebRelay. I am currently hosting a web server with a small webpage that I access from my Droid. This webpage sends the Lock, Unlock, Trunk, and Start command to the WebRelay in my car via a WWAN connection.


    I am looking to eliminate the hosted web server, and create a simple application that will just send the commands to the WebRelay when the corresponding onscreen button is pressed.

    I am hardware oriented and have no Java experience. I was hoping someone could help me with the syntax and point me in the right direction.

    I have not gotten very far, but I have Eclipse Java EE IDE up and running, with the Android SDK and with my Droid as a debug device.

    Commands :
    I need to only send 4 commands, each to their respective feature (lock, unlock, trunk, start):

    Lock: "htttp://"
    Unlock: ""
    Trunk: ""
    Start: ""

    I am assuming I need to use some sort of HTTP POST method. I did some digging around in the plugins directory of eclipse and noticed there is an apache.commons with HttpClient features. I was hoping this would work to send POST commands in Java.

    From what I have read there seem to be issues regarding the API (3.x vs. 4.0). This would obviously seem to cause a problem if the eclipse compiler is using a different version. Just something to think about...

    If I am way off base, I'm sorry-- I have never looked at a Java program before yesterday. If this is harder than just creating a simple snippet for each command, I apologize -- please just let me know.

    Thanks in advance!!!
    Last edited by jsg7377; 12-19-2009 at 10:34 AM.
  2. Droid Newbie
    Rizza's Avatar
    Member #
    Join Date
    Dec 2009


    To send commands to a web address its really rather simple using http post comands, since they are just query string variables, you can do it in two lines..

    //define your URL
    URL myURL = new URL("htttp://");
    //open a connection to the url
    URLConnection uCon = myURL.openConnection();

    There you go, you sent the commands to the server, thats it. Now if you want to get the response back, you'll need some more code, and i'll be glad to help with that, but hopefully this can get you started. Also dont forget to import the following in order to use the URL and URLConnection objects...

    mport java.net.URL;
    import java.net.URLConnection;

    Again, if you need more help, just email me at briridsdale--DOT--gmail.com (remove the --DOT-- and replace with @. I'll be happy to help walk you through building the app, and the actiivty, and layouts you'll need. Im interested in hearing more about your project.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. post #1
    By madpanic in forum Android Applications
    Replies: 7
    Last Post: 12-14-2009, 10:07 PM
  2. Post your applications and what they do
    By arm33n in forum Android General Discussions
    Replies: 1
    Last Post: 12-10-2009, 01:50 AM
  3. Is MSN supported at http://home.mobile.live.com?
    By skottmorris in forum Android General Discussions
    Replies: 2
    Last Post: 12-08-2009, 08:05 AM
  4. Please Post All Questions in ,,,,,,
    By JimMariner in forum Droid FAQ
    Replies: 0
    Last Post: 11-14-2009, 08:36 PM
  5. New Post Icon
    By Zippster in forum Android Tech Support
    Replies: 0
    Last Post: 11-02-2009, 07:37 PM

Search tags for this page

android httppost code
android httppost xml

http post droid

http post url for verizon
http post url verizon
http post verizon
httppost android bug samsung



verizon http post url

Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+