Running Send_SMS method from BroadcastReceiver
- by burmat
My application is an auto-reply application for text messages. I have a BroadcastReceiver for when a message arrives, and I need it to run a public method (Send_SMS).
SMS_Sender.sendSMS(phoneNumber, messageText);
does not work however, and eclipse wants to change my method to static. This would not be an issue if I did not have more receivers that catch when the message is sent/delivered/etc in this class. These receivers are then errors for being contained in a static method.
So my question is, how do I run this method from a broadcast receiver so I can send the auto reply whenever it is triggered with a received message?
-Thank you in advance,
Nate