0

My code

I am not able to send and receive SMS between 2 emulators. Where and how can I add the emulator phone numbers in my codes to send text messages?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

2

Just try to send the SMS to the AVD number. For example : 5554, thats all I do and its working.

The AVD number is on top of your AVD's window.

More source : Sending and receiving text using android emulator

And I've used this source when I was learning:
http://mobiforge.com/developing/story/sms-messaging-android

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Blaze Tama
  • 10,828
  • 13
  • 69
  • 129
  • I tried adding the number on 1 of the emulator and the 2nd emulator didnt receive any text. Thanks for the source but it looks like its about sending messages from the computer to the emulator. – user2889611 Oct 21 '13 at 09:39
  • Try to add the permission : – Blaze Tama Oct 21 '13 at 09:42
  • Do you try the reverse? Try to send the SMS from the 2nd to the 1st and see what happened :D. And it might be worth to check the new link in my updated answer. – Blaze Tama Oct 21 '13 at 09:55
  • Thanks for the new link you've sent! however im getting unknown errors like yellow underlined codes which i cant seem to get rid of:( – user2889611 Oct 22 '13 at 13:15
  • sorry for the long response. Could you please update your question with your "yellow underlined codes"? (well, it should be a warning). Have you tried to follow the tutorial? :D – Blaze Tama Oct 23 '13 at 02:47
  • Its ok:) I just updated my Q with a picture link for the error. And there was no declaration for R in the sample. however i had to declare R file while working on the sample. import com.example.smsmessaging.R; I assumed that that's the way to declare it yet its wrong. – user2889611 Oct 23 '13 at 08:29