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?
Asked
Active
Viewed 3,517 times
4
-
1Visit 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 Answers
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
-
2yes 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
2
Yes this is possible. Look up SmsManager
and you'll see an API you can use.

JoxTraex
- 13,423
- 6
- 32
- 45
-
ok I know SmsManager but how can i implement it into Broadcast receiver class? – Prem Singh Bist Jan 17 '12 at 07:53
-
2
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)

Zeeshan Sulemani
- 9
- 4