Entirely frustrated:
I have a Samsung VGA1000. I am trying to send and receive java ints to from my phone. On request for a DataInputStream on my phone to a StreamConnection object yields no network traffic. I know this because the phone did not ask if I wanted to allow the usage of mobile minutes.
Here is the code:
[code:1:afb00d77b5]
dataOut = hConn.openDataOutputStream();
//dataIn = streamConn.openDataInputStream();
dataOut.writeInt(12);
[/code:1:afb00d77b5]
Now here is the confusing part. Add that commented code back in, and we are in business.
[code:1:afb00d77b5]
dataOut = hConn.openDataOutputStream();
dataIn = streamConn.openDataInputStream();
dataOut.writeInt(12);
[/code:1:afb00d77b5]
At this point, the writeInt(12) seemingly does nothing. My InputStreamReader on the server side gets jibberish.
[code:1:afb00d77b5]
icm = dis.readInt();
System.out.println(icm); //prints garbage
[/code:1:afb00d77b5]
I have tried all sorts of different types of connections and I get no results.
Does anyone have any idea what the problem might be? Is there any information that I can provide?
Thanks.
Roderic
Show me