0

I have a problem sending my message data to my server pc using Socket connection.

What I have done is established a TCP socket connection where PC is my server and android phone is my client. I am able to exchange data.

I am stuck -- I get a message on my android phone and I want to send to the PC server the sender number and message body using my already connected TCP connection to the PC server.

sarnold
  • 102,305
  • 22
  • 181
  • 238
user983947
  • 135
  • 1
  • 2
  • 11

1 Answers1

0

Check how it's done in this question: Android - SMS Broadcast receiver

Basically, you'll need to give your app the required permissions, and then build and register a BroadcastReceiver object, that will get notified by the system when a message arrives.

Community
  • 1
  • 1
olex
  • 797
  • 5
  • 6
  • I am able to receive SmS contents: sender number and message body on a Toast dat i used to display, but my main concern is how to send this to Server using TCP dat i have already established and i am also able to exchange the data but not getting to transfer this content over TCP. – user983947 Dec 13 '11 at 04:24