I replied with some info on this over at Anddev where it was also
asked - before I noticed this.

http://www.anddev.org/viewtopic.php?p=10646#10646

HTH

On Sep 30, 4:23 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> hi all,
>
> I not quite familiar with android... hoping I can get some answer
> here... thanks...
> I have two questions here...
>
> 1st Question
> ---------------
> How can I use android to call a url and get the inputStream to get the
> content of the pages???
>
> Code in J2me:-
> -------------------
>  connection = (HttpConnection) Connector.open(Info.DeviceInfo.URL + "?
> cmd=gses&userid=" + userSession);
>  connection.setRequestMethod(HttpConnection.GET);
>
> if (connection.getHeaderField("Set-Cookie") != null) {
>          cookie = connection.getHeaderField("Set-Cookie");
>   }
>
> DataInputStream dis = connection.openDataInputStream();
>
> int ch;
> String str = "";
>
> while ((ch = dis.read()) != -1) {
>          str += (char) ch;
>
> }
>
> 2nd Question
> ----------------
> How can I get Stream Connection from a server using Android??
>
> Coding in J2me
> ------------------
> connection=(StreamConnection)Connector.open(DeviceInfo.URL_CONNECTION);
>
> inpStream = connection.openInputStream();
> outStream = connection.openOutputStream();
>
> anyone have any example can show me???
>
> wesley.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to