0

Hi guys can i write a service in android that will send text messages? because i wrote a similar activity triggered with a buttonPress event. but im trying to do the same like running a service that will send text messages. is this possible?

Programmer Bruce
  • 64,977
  • 7
  • 99
  • 97
Roses
  • 59
  • 2
  • 8

1 Answers1

0

Yes that would be straight forward, follow one of the many guides on creating a service, and one of the many guides on sending SMS messages. link 1, link 2.

If this hasn't helped, then please could you give more information on what the problem is? Thanks

Community
  • 1
  • 1
Jodes
  • 14,118
  • 26
  • 97
  • 156
  • Hi jodes it worked for me but i want to clarify..I wrong this pending intent to text messages through my application and it worked fine. but now that i am going to use a service to send messages while the phone is being locked..I used the same code with the pending intent..on the service but it did now work..can you give me an idea as to what the issue must be? – Roses May 08 '11 at 07:58
  • Did you get an exception of any kind? Perhaps it threw an exception which you did not notice? I know when I write catch statements the first thing I do is put in Log.e(.., ..) so it appears in Logcat – Jodes May 08 '11 at 23:21