sharathg.satya -10 Posting Whiz in Training

i am working with broad cast receivers with sms received.
i am trying to retrieve the message details like message , originating number.
i even got the code working correctly
this is the code i got by browsing the net

Bundle extraBundle = arg1.getExtras();
    if (extraBundle != null) {
        Object[] pdus = (Object[]) extraBundle.get("pdus");
        msgs = new SmsMessage[pdus.length];
        for (int i = 0; i < msgs.length; i++) {
        msgs[i]=SmsMessage.createFromPdu((byte[])pdus[i]);
        str+=msgs[i].getDisplayOriginatingAddress();
        str+=msgs[i].getMessageBody().toString();
        str+="\n";
        System.out.print(str);
        }

        Log.i("message ", str);
        Toast.makeText(arg0, "  "+str, 1000).show();
    }

but i am not able to understand what's happening with this code.
can anyone help me to understand the code..

msgs = new SmsMessage[pdus.length];
//does this code say that we are creating an array of size which is equal to all the messages in the inbox?

and even help me in clarifying all those statements.
please

thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.