thanks i loked at your alarmmanager code to send sms from a separate service, and bingo, it worked.
I need to send email similarly, i found this http://www.vidyut.com/sunit/android/android_sendmail.html but it invokes the mail ui of android, cant I silenly send email as i am sending sms ? regards On Dec 9, 1:44 pm, "Mark Murphy" <mmur...@commonsware.com> wrote: > > aha.... what i can or cannot do from the broadcastreceiver ? I am > > trying to send an sms , and i get an exception > > android.app.ReceiverRestrictedContext ! > > That exception would suggest you cannot send an SMS from a > BroadcastReceiver. :-) > > Seriously, I do not know if there is an official list of what can and > cannot be done. BroadcastReceivers are definitely limited, particularly in > that they cannot start any threads (either directly or by calling APIs > that start background threads). > > Have your BroadcastReceiver call startService(), and have your service > send the SMS. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en