4

I have a broadCast receiver class which listens on Switching off the phone, Now i wanted to send Sms when the phone is Switching off. Is it possible or not?

Kara
  • 6,115
  • 16
  • 50
  • 57
Prem Singh Bist
  • 1,273
  • 5
  • 22
  • 37
  • 1
    Visit http://stackoverflow.com/questions/7061321/how-can-i-send-an-sms-from-a-broadcastreceiver-and-check-its-status – SilentKiller Jan 17 '12 at 08:00

3 Answers3

3

check out this example of smsmanager.

Visit http://mobiforge.com/developing/story/sms-messaging-android

this is simplest example of SMSMANAGER.....

http://android-er.blogspot.com/2011/03/send-sms-using-androidtelephonysmsmanag.html

How can I send an SMS from a BroadcastReceiver and check its status?

Community
  • 1
  • 1
SilentKiller
  • 6,944
  • 6
  • 40
  • 75
  • 2
    yes I have checked it already. This example shows how to implement on activity class. I wanted it on BroadCast receiving & getting problem over specifying Pending intent . What shall i specify here on pending intent . Ex -- PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this,SMSMesseagingActivity.class), 0); – Prem Singh Bist Jan 17 '12 at 08:00
  • 2
    Ok silent_killer Thanks !! i will go thorough it!! – Prem Singh Bist Jan 17 '12 at 08:03
2

Yes this is possible. Look up SmsManager and you'll see an API you can use.

JoxTraex
  • 13,423
  • 6
  • 32
  • 45
0

1) Take a multimedia phone ,It is must because these types of phones will never off with this SMS 2) Then Go to Menu >>> Message >>> Write new message 3) Type 51 commas(for some of the phones or phone OS versions you need to use 79 commas instead of 51) [ ' ] like below(These are inverted commas)