Android:: Calling methods form Broadcasr Receiver class?
<p>I have an SMSreceiver class, I am new to android, now my question is that is it possible to call any methods in other class from that class. Basically what I am trying to do is to add each received message to the linked list of strings. Here is my code...</p>

<pre><code>public class SMSReceiver extends BroadcastReceiver {

/**
 * @see android.content.BroadcastReceiver#onReceive(android.content.Context, android.content.Intent)
 */
static List&lt;String&gt; recNumList = new LinkedList&lt;String&gt;();
static String message;
static Integer count = 0;
static String phoneNum;
static String newMessage = null;
List&lt;String&gt; recMsgs;
public void onReceive(Context context, Intent intent) {
    Bundle bundle = intent.getExtras();

    Object messages[] = (Object[]) bundle.get("pdus");
    SmsMessage smsMessage[] = new SmsMessage[messages.length];
    for (int n = 0; n &lt; messages.length; n++) {
        smsMessage[n] = SmsMessage.createFromPdu((byte[]) messages[n]);
    }
       phoneNum = smsMessage[0].getDisplayOriginatingAddress();
       message = smsMessage[0].getMessageBody() + "\n" +
    "Time Stamp:" + smsMessage[0].getTimestampMillis();
       recMsgs.add(message);
}
}
</code></pre>

<p>But the application force closes and does not add anything. Can someone help me please?</p>
