Socket socket = new Socket("192.168.0.196", 1000);

OutputStream ostream = socket.getOutputStream();

String greeting_Command = new String(

"HI"

);

byte[] b = greeting_Command.getBytes("us-ascii");

ostream.write(b);

istream = socket.getInputStream();

byte[] reply = new byte[4096];
istream.read(reply);

On Thursday, August 23, 2012 9:16:23 AM UTC-5, Androideed wrote:
>
> Thanks I noticed that after I posted, however that isn't the issue. Is 
> there a way to send and receive messages using TCP connections in android?
>
> On Wednesday, 22 August 2012 04:49:41 UTC+1, krishna wrote:
>>
>> what is viewtext? is it TextView or EditText? if you want to get text 
>> from TextView/EditText
>> call viewtext.getText().toString().
>>
>> On Wed, Aug 22, 2012 at 8:40 AM, TreKing <treki...@gmail.com> wrote:
>>
>>> On Mon, Aug 20, 2012 at 1:30 PM, Androideed <nnamdi.an...@gmail.com>wrote:
>>>
>>>> its not working! what am I doing wrong?
>>>
>>>
>>> Not explaining what "it's not working means".
>>>
>>> http://www.catb.org/~esr/faqs/smart-questions.html
>>>
>>>
>>> -------------------------------------------------------------------------------------------------
>>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
>>> transit tracking app for Android-powered devices
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to