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);
URLConne
the URL, and what
> is the "command" you are trying to pass? how does the endpoint accept
> the command? by reading POST data? through GET parameters?
>
> On 9/25/09 7:31 PM, HTN wrote:
>
>
>
>
>
> > I'm developing a remote app that sends commands via htt
connection.setRequestMethod("POST");
> > // create the post body to send
> > String content = credDevPair.toString();
> > Log.i("Request ... ",content);
> > DataOutputStream printout = new DataOutputStream (
> >
The code worked perfectly. Thanks for the help.
On Sep 27, 2:46 pm, Jeffrey Blattman
wrote:
> no, there's a default read timeout. the only thing i noticed wrong was
> that you were writing to URL itself to the stream.
>
> On 9/27/09 11:42 AM, HTN wrote:
>
>
>
>
4 matches
Mail list logo