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:-
-------------------
Using java Syntax Highlighting
- 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;
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
2nd Question
----------------
How can I get Stream Connection from a server using Android??
Coding in J2me
------------------
Using java Syntax Highlighting
- connection=(StreamConnection)Connector.open(DeviceInfo.URL_CONNECTION);
- inpStream = connection.openInputStream();
- outStream = connection.openOutputStream();
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
anyone have any example can show me???
wesley.




