Android SMS Listener for specific number
===

I am writing an application that communicates with other devices through SMSs.

I was able to implement a listener for received SMSs. The thing is that it is listening to all received messages. I would like to only listen received SMSs from a specific number.

Here is my `onReceive` method.

    @Override
    public void onReceive(Context context, Intent intent) {
        // TODO Auto-generated method stub
        Bundle bundle = intent.getExtras();
    
        Object messages[] = (Object[]) bundle.get("pdus");
        SmsMessage smsMessage[] = new SmsMessage[messages.length];
        for (int n = 0; n < messages.length; n++) {
            smsMessage[n] = SmsMessage.createFromPdu((byte[]) messages[n]);
        }
    
        // show first message
        Toast toast = Toast.makeText(context,
                      "Received SMS: " + smsMessage[0].getMessageBody(),
                      Toast.LENGTH_LONG);
        toast.show();
    }

