@@ -0,0 +1,3171 @@
+import android.app.Activity;%0Aimport android.content.ContentResolver;%0Aimport android.database.Cursor;%0Aimport android.net.Uri;%0Aimport android.os.Bundle;%0Aimport android.view.View;%0Aimport android.widget.AdapterView;%0Aimport android.widget.AdapterView.OnItemClickListener;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.ListView;%0Aimport android.widget.TextView;%0Aimport android.widget.Toast;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.ArrayList;%0Aimport java.util.Date;%0A%0A/*NOTE: Need permissions     %0A    %3Cuses-permission android:name=%22android.permission.WRITE_SMS%22 /%3E%0A    %3Cuses-permission android:name=%22android.permission.READ_SMS%22 /%3E%0A    %3Cuses-permission android:name=%22android.permission.RECEIVE_SMS%22 /%3E%0A    */%0A   %0A    public void getSMSData() %7B%0A        //Note, date coming from http://developer.android.com/reference/java/text/SimpleDateFormat.html%0A        ArrayList%3CString%5B%5D%3E SMSData = new ArrayList%3CString%5B%5D%3E ();%0A        String %5B%5D smsMessage = %7B%7D;%0A        String %5B%5D emptyVar = %7B%7D;%0A%0A        ContentResolver contentResolver = getContentResolver();%0A        //Inbox = %22content://sms/inbox%22%0A        //Sent = %22content://sms/sent%22%0A%0A        Cursor smsInboxCursor = contentResolver.query(Uri.parse(%22content://sms/inbox%22), null, null, null, null); //Point to inbox%0A        int indexBody = smsInboxCursor.getColumnIndex(%22body%22); //Point to body column%0A        int indexAddress = smsInboxCursor.getColumnIndex(%22address%22); //Point to sender's # column%0A        int indexDate = smsInboxCursor.getColumnIndex(%22date%22); //point to date column%0A%0A        if (indexBody %3C 0 %7C%7C !smsInboxCursor.moveToFirst()) return; //no messages%0A        arrayAdapter.clear();%0A        do %7B%0A            smsMessage = emptyVar;%0A            String addressSender = smsInboxCursor.getString(indexAddress); //sender's #%0A            String body = smsInboxCursor.getString(indexBody); //body of text%0A            Long dateMs = Long.parseLong(smsInboxCursor.getString(indexDate), 10);%0A            Date dateFromSms = new Date(dateMs);%0A            SimpleDateFormat simpleDate =  new SimpleDateFormat(%22dd/MM/yyyy HH:mm:ss.SSSZ%22);%0A            String strDt = simpleDate.format(dateFromSms); //date%0A%0A            //Pushing strings into local array%0A            smsMessage = push(smsMessage, addressSender);%0A            smsMessage = push(smsMessage, body);%0A            smsMessage = push(smsMessage, strDt);%0A            SMSData.add(smsMessage); //pushes local array into SMS list%0A        %7D while (smsInboxCursor.moveToNext());%0A%0A        //Printing to make sure it works%0A        TextView tv1 = (TextView)findViewById(R.id.textView2);%0A        String str2 = %22 %22;%0A        for(int i=0; i %3C SMSData.size(); i++)%7B%0A            str2 += %22Address = %22 + SMSData.get(i)%5B0%5D + %22%5Cn%22 +%0A                    %22Body = %22 + SMSData.get(i)%5B1%5D + %22%5Cn%22 +%0A                    %22Date = %22 + SMSData.get(i)%5B2%5D + %22%5Cn%22;%0A        %7D%0A        tv1.setText(str2);%0A        return;%0A%0A    %7D%0A    %0A    private static String%5B%5D push(String%5B%5D array, String push) %7B //push function%0A        String%5B%5D longer = new String%5Barray.length + 1%5D;%0A        System.arraycopy(array, 0, longer, 0, array.length);%0A        longer%5Barray.length%5D = push;%0A        return longer;%0A    %7D%0A

Create getSMSData.java